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

Login error... #2

Open
Buchhems opened this issue Dec 13, 2023 · 4 comments
Open

Login error... #2

Buchhems opened this issue Dec 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Buchhems
Copy link

Here's the log

2023-12-13T16:49:40.634331509Z [CACHE] Book(link='mediaInfo,0-0-1926008802-200-0-0-0-0-400002-0-0.html', title='Nein sagen & Grenzen setzen - Das Geheimnis wahrer Selbstliebe: So gewinnst du die Kontrolle über dein Leben zurück. Deine Reise zu mehr Selbstbewusstsein, besseren Beziehungen und inneren Frieden', format='audio', library='verbund_hessen', available=False, availability_date=datetime.date(2024, 1, 21), _author='Riedel, Maria', description='Das Geheimnis der Selbstliebe: Wie du den Mut aufbringst, richtig Grenzen zu setzen (ohne schlechtes ...', insert_date=datetime.date(2023, 12, 10))

2023-12-13T16:49:40.634342585Z [CACHE] Book(link='mediaInfo,0-0-1873312748-200-0-0-0-0-400002-0-0.html', title='Drachenbanner - Waringham Saga, Teil 7 (Gekürzt)', format='audio', library='verbund_hessen', available=False, availability_date=datetime.date(2024, 5, 9), _author='Gablé, Rebecca', description='England 1238: Die junge Adela of Waringham und Bedric, Sohn einer leibeigenen Bauernfamilie, sind zu ...', insert_date=datetime.date(2023, 12, 10))

2023-12-13T16:49:40.634349541Z [CACHE] Magazine(link='mediaInfo,0-0-1871858161-200-0-0-0-0-0-0-0.html', title='c´t (18/2022)', format='emagazine', library='verbund_hessen', available=True, availability_date=datetime.date(2023, 12, 13))

2023-12-13T16:49:40.634355829Z [CACHE] Book(link='mediaInfo,0-0-1604478962-200-0-0-0-0-400002-0-0.html', title='Eat that Frog - Young Generation', format='audio', library='verbund_hessen', available=False, availability_date=datetime.date(2024, 1, 4), _author='Tracy, Brian;\nLeinberger, Anna', description='Hast du manchmal das Gefühl, keine Zeit für all die Dinge zu haben, die dir wichtig sind? So geht es ...', insert_date=datetime.date(2023, 12, 10))

2023-12-13T16:49:40.634364757Z [CACHE] Magazine(link='mediaInfo,0-0-1941439992-200-0-0-0-0-0-0-0.html', title='c´t (25/2023)', format='emagazine', library='verbund_hessen', available=True, availability_date=datetime.date(2023, 12, 13))

2023-12-13T16:49:40.634373511Z [CACHE] Magazine(link='mediaInfo,0-0-1724680698-200-0-0-0-0-0-0-0.html', title='c´t (05/2022)', format='emagazine', library='verbund_hessen', available=True, availability_date=datetime.date(2023, 12, 13))

2023-12-13T16:49:40.634380422Z Removed media 'Make (01/2023)' from known_media for notification test

2023-12-13T16:50:46.770781356Z Make (01/2023) matches filter

2023-12-13T16:50:46.770871241Z Make (01/2023) is available, trying auto rent

2023-12-13T16:50:48.878268636Z An error of type LoginError occurred: Unable to determine if the login was successful.

2023-12-13T16:50:48.900117515Z An error of type ConnectionError occurred: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

2023-12-13T16:50:48.900163020Z [MAGAZINE] <b><a href="https://www.onleihe.de/verbund_hessen/frontend/mediaInfo,0-0-1920392211-200-0-0-0-0-0-0-0.html">Make (01/2023)</a></b> auto rented :)

@Buchhems
Copy link
Author

The magazine is not rented....

@nzb-tuxxx
Copy link
Owner

nzb-tuxxx commented Dec 13, 2023

I think the problem is that hessen uses the subdomain (https://hessen.onleihe.de/verbund_hessen/)) while niedersachsen uses generic subdomain (https://www.onleihe.de/nbib24/) which i hardcoded into onleihe.py line 48, 91 and 115 because i wasnt aware of this. Could you please try to replace www with hessen in your local environment and check if that works? if yes than we need to refactor some code to support different subdomains based on the verbund.

@mikesch4711
Copy link

With the voebb, it unfortunately does not work either:
https://www.voebb.de/oidcp/authorize?prompt=consent&client_id=divibib003&response_type=code&redirect_uri=https://upa.onleihe.de/ws/openid/authorize&state=45C1E8E42DF9A63E37C6DEFF829D34EB&scope=openid+adisbms

Here, the form seems to be structured a bit differently, so that it's not enough to just change the URL (or hard code it).
Unfortunately, I am not very familiar with soup. However, I could read up on it to create a PR. This might take some time though…

@nzb-tuxxx
Copy link
Owner

Thanks for the hint.

So if you check the specific login page for your online verbund there seems to be a number in square brackets between 1 and 4. in my case it is [2] which is referring to the used authentication method https://www.onleihe.de/nbib24/frontend/content,0-0-0-105-0-0-0-0-0-0-0.html#auth-pk341 - so i think currently only 2 and maybe 3 is implemented.

If someone can implement these or provide records of the post requests or send me credentials for login this would be great.

@nzb-tuxxx nzb-tuxxx added the bug Something isn't working label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants