alexgand / springer_free_books

Python script to download all Springer books released for free during the 2020 COVID-19 quarantine
GNU General Public License v3.0
1.65k stars 366 forks source link

Improve resilience regarding downloads #49

Closed Dovyski closed 4 years ago

Dovyski commented 4 years ago

First of all, thank you very much for this script to download the books. It's awesome!

I faced a few problems while downloading the books using a flaky connection. If the network fails, the script stops. Even though it doesn't attempt to redownload already downloaded books, it still makes a request for them anyway.

This PR improves upon this. The script will not perform requests before checking if the books are already downloaded when it resumes operations after a fail. It speeds up the download of missing books after a failure recovery. Additionally, if for some reason the request fails, the script now reports this error and sleeps for 30 seconds. After it continues downloading the next book in the queue. This prevents the user from regularly checking if the script is still working.

Thank you again for your script!

Dovyski commented 4 years ago

Vi só agora que você é brasileiro 🇧🇷 😄 Que prazer saber disso, parabéns pelo script!