jalexw / pdf-ripper

Use this code to get a PDF from a textbook viewer by automatically looping through your textbook and taking a screenshot of each page.
https://jalexw.github.io/pdf-ripper/
GNU General Public License v3.0
25 stars 1 forks source link

suggest ripper with a longer tipper timer #6

Closed Mikhael913 closed 2 years ago

Mikhael913 commented 2 years ago

There have been several instances where the automation rips a page that has yet to be loaded, as the reader needs to load in the next batch of sections, even though a local copy exists in the system. The issue doesn't occur if the user is manually ripping by sections as loaded in the reader, but the issue occurs when the user is ripping from the first to the last page where pages would exceed a few hundred pages.

image

jalexw commented 2 years ago

Hmmm, I didn't run into this issue as my internet is quite fast so the pages loaded near instantly for me.

As a work around you could change the delay on line 100 of ripper.py to give pages more time to load:

# Wait a little bit to allow the page to fully load
sleep(modify_delay_randomly(0.5))

into:

# Wait a little bit to allow the page to fully load
sleep(modify_delay_randomly(2.0))

This will take longer to get through all of the pages although it should solve your page loading problem.

jalexw commented 2 years ago

I've pushed a new GUI version that has a slider that allows changing the delay between typing a new page number and actually taking the screenshot. Should help out people who have slow internet.

gui_screenshot
Mikhael913 commented 2 years ago

Thank you very much for your most recent update, I have been busy with training for my license for these past few months. I have started to introduce this with other coursemates who are in similar circumstances, yet lacking experience in programming. Cheers.