Skip to content
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

New|Alternative DKB Frontend starting May 2023 #39

Closed
chaoslion opened this issue Apr 26, 2023 · 13 comments
Closed

New|Alternative DKB Frontend starting May 2023 #39

chaoslion opened this issue Apr 26, 2023 · 13 comments
Labels

Comments

@chaoslion
Copy link

chaoslion commented Apr 26, 2023

Hey Guys,

DKB is launching an (alternative) login page: https://bank.dkb.de/dein-neues-banking/?wt_mc=pk.ba_ga.fsm.lang.g.230417.

Schneller ins neue Banking – die Login-Seite ändert sich
Ab Anfang Mai gibt es frischen Wind auf deiner Anmeldeseite. Du kannst dich wie gewohnt im bisherigen Banking anmelden oder mit deinen Anmeldedaten das neue Banking ausprobieren.

The transaction list seems to be limited to 1 Year:

Du hast das Ende deiner Umsatzliste erreicht. Wir können Umsätze bis zu 360 Tage anzeigen.

They also seem to change the csv format a bit:

"Konto";"<NAME> <IBAN>"
""
"Kontostand vom <DATE>:";"<AMOUNT> EUR"
""
"Buchungsdatum";"Wertstellung";"Status";"Zahlungspflichtige*r";"Zahlungsempfänger*in";"Verwendungszweck";"Umsatztyp";"Betrag";"Gläubiger-ID";"Mandatsreferenz";"Kundenreferenz"
@grindsa grindsa pinned this issue Apr 26, 2023
@grindsa
Copy link
Owner

grindsa commented Apr 26, 2023

I did already saw this yesterday but could not log in as I did not get the 2FA confirmation in my banking app. Based on what you wrote I assume you were able to login. Thus, which dkb-app are you using?

@chaoslion
Copy link
Author

i'm using the (new?) one (version 1.29.1): https://play.google.com/store/apps/details?id=com.dkbcodefactory.banking

@grindsa
Copy link
Owner

grindsa commented Apr 27, 2023

I am using the older app as it has more features than the one you are using. Anyway let me upgrade over the weekend and look what I can do.

@DominikRoB
Copy link
Contributor

If you can, please keep the old methods working for a few more versions.. I am actively trying to avoid their new updates until all bugs are fixed.

@grindsa
Copy link
Owner

grindsa commented Apr 28, 2023

Hi, I will do all my changes in a separate branch. The current module should work as long as DKB keeps the old banking portal alive... But lets see. Next week we will know more...

@grindsa
Copy link
Owner

grindsa commented Apr 29, 2023

Had a look this morning. First thoughts: it does not look that bad. Authentication is based on bearer token so different than before. The new UI is limited in functionality and you can switch to the "legacy" webpage without reauthentication. So there is a good chance that the current methods can be kept and adapted over time and its just the login method which needs to be changed.

@grindsa
Copy link
Owner

grindsa commented May 14, 2023

Just to keep you guys updated; I extended the library to support logins via the new frontend. After logging a switch to the "old" website will be performed and the data get scraped there. That means that all methods will continue to work for the time being. Support is still experimental, thus please do not use the code in production.

Modifications got pushed to devel and ready for wider testing. Feedback is always welcome. For the moment i have no plans to incorporate to master as there are still api-changes happening from time to time.

You can test the new frontend by using the legacy_login=False option:

with DKBRobo(DKB_USER, DKB_PASSWORD, TAN, legacy_login=False) as dkb:
  ...

@grindsa grindsa added enhancement New feature or request fix ready for testing labels May 14, 2023
@chaoslion
Copy link
Author

I can confirm, it works really well

python3 -m pip install git+https://github.com/grindsa/dkb-robo.git@devel Branch 'devel' set up to track remote branch 'devel' from 'origin'. Resolved https://github.com/grindsa/dkb-robo.git to commit 2022269004878a7bd91c948ccf05417ff2d37172

>>> from dkb_robo import DKBRobo
>>> dkb = DKBRobo("user", "pass", legacy_login=True)
>>> dkb.__enter__()
check your banking app and confirm login...
>>> dkb.account_dic
{0: {'name': 'xzy', ...
>>> dkb.get_transactions("https://www.dkb.de/DkbTransactionBanking/content/banking/financialstatus/FinancialComposite/FinancialStatus.xhtml?$event=paymentTransaction&row=0&group=0", "account", "01.01.2022", "01.01.2023")
[{'bdate': '30.12.2022', 'vdate': '3..

👍

@grindsa
Copy link
Owner

grindsa commented May 15, 2023

Can you please test with legacy_login=False option to use the new web-frontend?

legacy_login=True uses the old login method. Sorry for not being precisely enough.

@chaoslion
Copy link
Author

No worries, i tested both.
The only difference is that the name of my 2FA device is shown with legacy off:

>>> from dkb_robo import DKBRobo
>>> dkb = DKBRobo("user", "pass", legacy_login=False)
>>> dkb.__enter__()
check your banking app on "DKB-App auf xyz" and confirm login...
<dkb_robo.dkb_robo.DKBRobo object at 0x7f03d2600160>
>>> dkb.account_dic
{0: {'name': '...

@grindsa
Copy link
Owner

grindsa commented May 15, 2023

If the name of the 2FA is the only difference you noticed my code works as expected :-) Thank you for your confirmation...

@grindsa
Copy link
Owner

grindsa commented May 19, 2023

Enhanced the code by an option to select the 2FA device from a list:

Pick an authentication device from the below list:
[0] - DKB-App on Google Pixel 6
[1] - DKB-App on iPad
:0

In case you have a chance please test this as well.

@chaoslion
Copy link
Author

Unfortunately i only have one device :(. Maybe somebody else could help out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants