Skip to content

Instantly share code, notes, and snippets.

@monofox
Created February 11, 2017 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monofox/59fbd5fb789040e3731922e8806e6918 to your computer and use it in GitHub Desktop.
Save monofox/59fbd5fb789040e3731922e8806e6918 to your computer and use it in GitHub Desktop.
#!/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 '<type-your-pw>'
acc = aqbanking.Account(no='<KTO>', bank_code='<BLZ>')
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