adrianlois / RedShelf-Bypass-DRM-PDFDownload

RedShelf Virdocs - Bypass DRM protection PDF Download. Download ePub/eReader documents to PDF when downloading and printing is not allowed.
GNU General Public License v3.0
18 stars 7 forks source link

Keeps downloading first page over and over #3

Open brendandelany opened 9 months ago

brendandelany commented 9 months ago

It’s possible I’ve made a mistake, since I’m new to Python (and programming in general), but when I run the file in Terminal it just repeatedly downloads the first page while changing the filename. I’ve attached screenshots of the download folder for reference.

download folder screenshot #1 download folder screenshot #2 download folder screenshot #3

I can share the modified Python and JSON files if that helps. I can also screenshot my Terminal window and share that too. Just let me know.

chropic commented 9 months ago

Getting this same error.

angelito-dev commented 9 months ago

It is an error on your file, you must follow the instructions. They are ok.

base_url = "https://platform.virdocs.com/rscontent/epub/XXXXXXX/XXXXXXX/OEBPS/images/page-{}.jpg" pdf_file = "EXPORT_PDF_FILE.pdf" numpag = 350

Modify ONLY the XXXX part and the "numpag" and it should work

adrianlois commented 9 months ago

Correct, the variable "numpag" indicates the last page of the document with reference to the URL. It should not be confused with the last page of the document itself.

For example, if a book has 300 pages, it is possible that the last page referenced in the URL is a higher number that does not exactly match the page of the book (.../page-306.jpg") with 306 being the 300th page corresponding to the book.

angelito-dev commented 9 months ago

To clarify, this method did not work for all documents in RedShelf, some of them are not images but text and cannot be dowloaded. thank you very much adrianlois for the work done.