lorenzodifuccia / safaribooks

Download and generate EPUB of your favorite books from O'Reilly Learning (aka Safari Books Online) library.
Do What The F*ck You Want To Public License
4.65k stars 691 forks source link

Issue with downloading older Books #236

Closed falaqm closed 3 years ago

falaqm commented 3 years ago

I observed an error when downloading older Oreilly books. https://learning.oreilly.com/library/view/design-patterns-elements/0201633612/

Unhandled Exception: 'rights' (type: KeyError)

axrt commented 3 years ago

Same here, the book is https://learning.oreilly.com/library/view/refactoring-at-scale/9781492075523/

[-] Logging into Safari Books Online...
[-] Successfully authenticated.
[*] Retrieving book info...
[#] Unhandled Exception: 'rights' (type: KeyError)
[!] Aborting...

will be eager to help out debug with guidance, cuz not very familiar with the code yet.

aldovilardy commented 3 years ago

It's happening with all books not just with the old ones:

██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ ██╔═══██╗ ██╔══██╗██║ ╚██╗ ██╔╝╚════██╗ ██║ ██║ ██████╔╝██║ ╚████╔╝ ▄███╔╝ ██║ ██║ ██╔══██╗██║ ╚██╔╝ ▀▀══╝ ╚██████╔╝ ██║ ██║███████╗██║ ██╗ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝


[-] Logging into Safari Books Online...
[-] Successfully authenticated.
[*] Retrieving book info...
[#] Unhandled Exception: 'rights' (type: KeyError)
[!] Aborting...
jacabreragt commented 3 years ago

O'Reilly changed the API.

Here is the fix: https://github.com/jacabreragt/safaribooks/commit/250d1c611b970d53ce93ee6fe630cd582928370c

falaqm commented 3 years ago

This one worked for me.

https://github.com/nhonaitran/safaribooks/commit/fef3b21dd42617f62f9a416c9dce6c981e011bb9

falaqm commented 3 years ago

O'Reilly changed the API.

Here is the fix: https://github.com/jacabreragt/safaribooks/commit/250d1c611b970d53ce93ee6fe630cd582928370c

not able to open the link

jacabreragt commented 3 years ago

O'Reilly changed the API. Here is the fix: https://github.com/jacabreragt/safaribooks/commit/250d1c611b970d53ce93ee6fe630cd582928370c

not able to open the link

I'm sorry. Edited.

Bomberdash commented 3 years ago

bad url

jacabreragt commented 3 years ago

bad url

https://github.com/jacabreragt/safaribooks/commit/250d1c611b970d53ce93ee6fe630cd582928370c

Bomberdash commented 3 years ago

Good afternoon! Thank you for your constant help !!! Making these changes to the safaribooks.py file not only does not solve this problem, but also leads to another Here's what is given out on an attempt to download https://learning.oreilly.com/library/view/advanced-engineering-mathematics/9781284105971/ "~~~~~~~~~~~

[-] Logging into Safari Books Online ...

[-] Successfully authenticated.

[*] Retrieving book info ...

[#] Unhandled Exception: 'description' (type: KeyError)

[!] Aborting ... " Although there is a description. And it doesn't take up much space

lorenzodifuccia commented 3 years ago

Try to pull new commit (thanks to @nhonaitran with PR #239 and @avineshwar with PR #245)