evmer / perlego-downloader

Download books from Perlego.com in PDF format
MIT License
106 stars 52 forks source link

websocket expception error #6

Closed smack893 closed 1 year ago

smack893 commented 1 year ago

image

smack893 commented 1 year ago

image same issue in linux

evmer commented 1 year ago

Hello, can you please share the BOOK_ID so I can investigate the issue?

smack893 commented 1 year ago

Hello, can you please share the BOOK_ID so I can investigate the issue?

Book ID: 1425905 also found another issue see the below image it cut down page and show complete empty page image

evmer commented 1 year ago

@smack893

Regarding the first issue ("Illegal frame"), I'll replace the websocket library with a more stable one. In the meanwhile, you can just restart the script and it'll be fine.

Unfortunately there's not much we can do to fix the wrong page splitting bug. The original book format is EPUB (= infinite content size) and the output is a PDF document, so the original content is split into multiple pages with a fixed (arbitrary) height that may not fit with the content.

Maybe in the future I'll add the direct conversion in EPUB as somebody already suggested (#5).

evmer commented 1 year ago

This bug is now fixed. If a 'Illegal frame' is received, the script will try to reconnect to the websocket and resume the download:

image