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.62k stars 685 forks source link

Issue #237: unhandled exception for missing "rights" key #239

Closed nhonaitran closed 3 years ago

nhonaitran commented 3 years ago

Reported issue #237 is caused by unhandled exception thrown for missing key "rights" in the info and book_info dictionaries when fetching book info.

This PR addresses above issue by replacing "rights" key lookup to using built-in get method with default value if the key is missing in the dictionary.

Similar replacements applied to other keys as well to prevent similar missing key exception.

Bomberdash commented 3 years ago

Also stopped working with the output "right" Please explain what needs to be done specifically and in which file?

avineshwar commented 3 years ago

Please refer to this: https://github.com/lorenzodifuccia/safaribooks/pull/245/commits

Or, you won't be able to generate an "EPUB".