-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to Postbox-Archiv folder via new frontend #59
Comments
Hi, currently its not possible but let me have a look what can be done... |
I'm taking a quick look to see if there's something obvious going on. The first time opening "Weitere Dokumente" I see a POST request to https://banking.dkb.de/api/sso-redirect. The response is
where the I haven't yet tried playing with the client... |
Ah, ok... turns out what I just discovered above already implemented as |
Making some good partial progress!!! In short, it looks like we need to adjust the base URL from https://www.ib.dkb.de to https://www.ib.dkb.de/ssohl. (We may need to do more on top of this.) Here's my work from the REPL: Set up logging: import logging
debug = False
if debug:
log_mode = logging.DEBUG
else:
log_mode = logging.INFO
# define standard log format
log_format = '%(message)s'
logging.basicConfig(
format=log_format,
datefmt="%Y-%m-%d %H:%M:%S",
level=log_mode)
logger = logging.getLogger('dkb_robo') Set up wrapper (I used my own settings class): from dkb_robo.api import Wrapper
w = Wrapper(
dkb_user=settings.dkb_user,
dkb_password=settings.dkb_password,
mfa_device=3,
logger=logger,
)
# login and get the account overview
(account_dic, last_login) = w.login() Note that Hold the session open (requires #70) from dkb_robo.refresher import SessionRefresher
refresher = SessionRefresher(w.client)
refresher.start() Define expected text in the old Postfach HTML: my_name = "Mares" Query it: def query_old_banking_state() -> str:
old_banking = w.client.get("https://www.ib.dkb.de/ssohl/banking/postfach")
old_banking.raise_for_status()
if "Entdecke dein neues Banking!" in old_banking.text:
return "Unauthenticated"
elif my_name in old_banking.text:
return "Authenticated"
else:
return "Unknown state"
print(query_old_banking_state()) Trigger the redirect to authenticate on the old Postfach: w._do_sso_redirect()
print(query_old_banking_state()) This should always be Configure the legacy wrapper: from dkb_robo.legacy import Wrapper as Legacywrapper
lw = Legacywrapper(logger=logger)
lw.base_url += "/ssohl"
lw.dkb_br = lw._new_instance(w.client.cookies) Very important, the new legacy base URL has added Now look at what we can do! import json
postbox_dic = lw.scan_postbox()
print(json.dumps(postbox_dic, indent=2, ensure_ascii=False)) {
"Mitteilungen": {
"name": "Mitteilungen",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=%24inbox",
"documents": {}
},
"Vertragsinformationen": {
"name": "Vertragsinformationen",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=%24vertragsinformationen",
"documents": {}
},
"Kontoauszüge": {
"name": "Kontoauszüge",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=%24kontoauszuege",
"documents": {}
},
"Kreditkartenabrechnungen": {
"name": "Kreditkartenabrechnungen",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=%24kreditkartenabrechnungen",
"documents": {}
},
"Wertpapierdokumente": {
"name": "Wertpapierdokumente",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=%24wertpapierdokumente",
"documents": {}
},
"Steuerbescheinigungen": {
"name": "Steuerbescheinigungen",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=%24steuerbescheinigungen",
"documents": {}
},
"Archiv": {
"name": "Archiv",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=archiv",
"documents": {}
},
"Tresor": {
"name": "Tresor",
"details": "https://www.ib.dkb.de/ssohl/ssohl/banking/postfach/ordner?$event=gotoFolder&folderNameOrId=tresor",
"documents": {}
}
} |
We need to fix the reconstruction of the full I'm experimenting with the timeouts for the old Postfach, and it seems that print(query_old_banking_state())
time.sleep(119)
print(query_old_banking_state())
time.sleep(119)
print(query_old_banking_state())
time.sleep(121)
print(query_old_banking_state())
|
Hi,
The old website login has been deactived by DKB.
Login via the new website still allows to access the old Postfach (Postfach -> Weitere Dokumente) in an iFrame. The iFrame is the old Website. In the iFrame only the old Postfach can be accessed.
I had no luck downloading the contents of the old Archiv folder with
dkb.scan_postbox(path, download_all True, archive True, prepend_date False).
Is this old website "Archiv" folder downlaodable?
Thanks a lot.
The text was updated successfully, but these errors were encountered: