Created
February 11, 2017 16:33
-
-
Save elohmeier/e12fec18d975575f7431587946e1373b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import aqbanking | |
def callback(domain, prio, msg): | |
print('[LOG]: %r' % (msg,)) | |
def password_cb(flags, token, title, text, minLen, maxLen): | |
# we'll get something like: | |
# Password: 0 / PIN_<bank code>_<User> / PIN-Eingabe / Bitte geben Sie die PIN für | |
# Benutzer 000000000 bei <Bank> | |
# ein.<html>Bitte geben Sie die PIN für Benutzer <i>[user]</i> bei <i>[bank name]</i> ein.<br></html> / 4 / 64 | |
#print('Password: %s / %s / %s / %s / %s\n' % (str(flags), token, title, str(minLen), str(maxLen))) | |
return 'PIN_**BLZ**_**USERNAME**=**PIN**' | |
acc = aqbanking.listacc()[0] | |
acc.set_callbackLog(callback) | |
acc.set_callbackPassword(password_cb) | |
ret = acc.balance() | |
if ret is not None: | |
try: | |
print(ret[0]) | |
except TypeError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment