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

Enhancement for book set download #231

Closed BonjourGit closed 1 year ago

BonjourGit commented 4 years ago

Hi,

When a book id is a book set (i.e. contains sub books), the tool did not seem to recognize the sub books and download them correctly. The resulting EPUB output was not correct either. For example, https://learning.oreilly.com/library/view/5-years-of/9781647820213/ This book (9781647820213) is actually a book set that consists of 5 books. Just as an example, the sub books chapters content is in the form: "content":"https://learning.oreilly.com/api/v1/book/9781647820213/chapter-content/10064/OEBPS/xhtml/chapter005.xhtml" with a relative path "path":"10064/OEBPS/xhtml" to the book url. The same applies to book images and stylesheets etc. It looks like the tool currently omits the relative path causing the sub book not being downloaded correctly.

Can you please consider an enhancement to the tool to enable the correct download for book set? Very much appreciated!

Thanks.

lorenzodifuccia commented 3 years ago

Future Request


However, can you download each sub-book individually?

BonjourGit commented 3 years ago

Thank you for the reply. Yes, individual sub-book can be downloaded with BookId when it is available separately. Exactly the workaround I used for a book set with the current tool. It just took some time to search for the sub-books. Not a big deal though.