lmbringas / packtpub-downloader

Script to download all your books from PacktPub inspired by https://github.com/ozzieperez/packtpub-library-downloader
267 stars 84 forks source link

JWT token expiry/refresh will still prematurely end downloads #28

Open teekay30 opened 4 years ago

teekay30 commented 4 years ago

https://github.com/lmbringas/packtpub-downloader/blob/f0e03ff636efcc06af6b1e3e361622116362ff03/main.py#L67

Whenever the token refresh is hit and the function returns, it will continue on to the error which is probably why issues #19 and #9 were also created.

Adding a 'return' at the beginning of this line will make it so that it returns the value of the recursively called function and exit the initially called function. This will stop it from flowing onto the error message and returning the blank string, indicating a failure to retrieve the book URL.

artifexor commented 4 years ago

same for line 88