packt-cli / Packt-Publishing-Free-Learning

Scripts that automatically claim and download free daily eBooks from https://www.packtpub.com/packt/offers/free-learning
MIT License
858 stars 185 forks source link

Two weeks without any new books #110

Closed ranrinc closed 6 years ago

ranrinc commented 6 years ago

I have this problem with the script not downloading any books. Got error as attached. Help?

screen shot 2018-08-18 at 11 58 45 am
mjenczmyk commented 6 years ago

What command did you ran to get this output?

InfoSecured commented 6 years ago

I'm having the same exact issue. I'm running a bat file to execute the python script on Windows. Nothing has changed with the script for the past several months.

mjenczmyk commented 6 years ago

Do both of you have the newest version of the script?

@InfoSecured Do you use unmodified bat file from the repository? Do you run it manually or via schtasks?

@ranrinc How do you run this script? Manually or via cron/schtasks? What exact command do you run?

InfoSecured commented 6 years ago

I'm using your script via schtasks and the only line I modified is line 11 to say 'python packtPublishingFreeEbook.py -sgd' instead of 'python packtPublishingFreeEbook.py -gd'

Jason S. Lazerus, M.S., GCFA, GPEN, GCIH, GCFE, GCED, GSEC

On Mon, Aug 20, 2018 at 1:44 PM, mjenczmyk notifications@github.com wrote:

Do both of you have the newest version of the script?

@InfoSecured https://github.com/InfoSecured Do you use unmodified bat file from the repository? Do you run it manually or via schtasks?

@ranrinc https://github.com/ranrinc How do you run this script? Manually or via cron/schtasks? What exact command do you run?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/igbt6/Packt-Publishing-Free-Learning/issues/110#issuecomment-414403084, or mute the thread https://github.com/notifications/unsubscribe-auth/AP70A3k4ohRJucuYfqok5Hz97iEkXINTks5uSvWFgaJpZM4WCb6B .

mjenczmyk commented 6 years ago

I have an idea what could be the reason of this issue. Recently list of all user's ebooks in Packt account became paginated, if the ebook grabbed the day the script failed (as both of you reported) had already been in your account the script may have tried to download that day free learning ebook, but it wasn't on the first pagination page and the script couldn't find that ebook in your account - that was before merging my fix into master.

The issue should be fixed in 3069d8de0e4154acaeffa54de76e080cfbaea892 commit which already is on master - can you confirm that script works as expected on current master? Have I explained everything in understandable way?

mjenczmyk commented 6 years ago

BTW, could you take a look at #100 @InfoSecured? I'd like to finish this, but neither me, nor @igbt6 can verify if that works (and potentially fix this pull request), as we don't have access to machine with Windows. I'd really appreciate help with this pull request.

InfoSecured commented 6 years ago

It appears that this worked!

Grabbing free eBook from Packt Publishing.... [INFO] - Creating session... [INFO] - Session created, logged in successfully! [INFO] - Start grabbing eBook... [INFO] - Captcha detected. Trying to solve it using anti-captcha.com. [INFO] - TaskId created: 252702383 [INFO] - Waiting for completion of the task: 252702383... [SUCCESS] - Solution found for task: 252702383 [SUCCESS] - eBook: 'OpenCV_3_Computer_Vision_Application_ProgrammingCookbook-_Third_Edition' has been successfully grabbed! [INFO] - Getting your books data... [INFO] - https://www.packtpub.com/account/my-ebooks has been successfully opened. [INFO] - Getting books data from https://www.packtpub.com/account/my-ebooks. .. [INFO] - Fetching books data from https://www.packtpub.com/account/my-ebooks... [INFO] - Books data from https://www.packtpub.com/account/my-ebooks has been successfully fetched. [INFO] - Getting books data from https://www.packtpub.com/account/my-ebooks?page=2... [INFO] - Fetching books data from https://www.packtpub.com/account/my-ebooks?page=2... [INFO] - Books data from https://www.packtpub.com/account/my-ebooks?page=2 has been successfully fetched. [INFO] - Getting books data from https://www.packtpub.com/account/my-ebooks?page=3... [INFO] - Fetching books data from https://www.packtpub.com/account/my-ebooks?page=3... [INFO] - Books data from https://www.packtpub.com/account/my-ebooks?page=3 has been successfully fetched. [INFO] - Getting books data from https://www.packtpub.com/account/my-ebooks?page=4... [INFO] - Fetching books data from https://www.packtpub.com/account/my-ebooks?page=4... [INFO] - Books data from https://www.packtpub.com/account/my-ebooks?page=4 has been successfully fetched. [INFO] - Books data has been successfully fetched. [INFO] - Title: 'OpenCV_3_Computer_Vision_Application_ProgrammingCookbook-_Third_Edition' [INFO] - Downloading eBook: 'OpenCV_3_Computer_Vision_Application_ProgrammingCookbook-_Third_Edition' in .pdf format... [PROGRESS] - [################################################# ] 100.0% [SUCCESS] - eBook: 'OpenCV_3_Computer_Vision_Application_ProgrammingCookbook-_Third_Edition.pdf' downloaded successfully! [INFO] - 1 eBooks have been downloaded! [INFO] - File OpenCV_3_Computer_Vision_Application_ProgrammingCookbook-_Third_Edition.pdf already exists on Google Drive [SUCCESS] - Good, looks like all went well! :-) Done !

Jason S. Lazerus, M.S., GCFA, GPEN, GCIH, GCFE, GCED, GSEC

On Sun, Aug 26, 2018 at 3:04 PM, mjenczmyk notifications@github.com wrote:

BTW, could you take a look at #100 https://github.com/igbt6/Packt-Publishing-Free-Learning/pull/100 @InfoSecured https://github.com/InfoSecured? I'd like to finish this, but neither me, nor @igbt6 https://github.com/igbt6 can verify if that works (and potentially fix this pull request), as we don't have access to machine with Windows. I'd really appreciate help with this pull request.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/igbt6/Packt-Publishing-Free-Learning/issues/110#issuecomment-416061054, or mute the thread https://github.com/notifications/unsubscribe-auth/AP70A6dWhks1wYYq-FJBKuYgYC0-gDO3ks5uUvFBgaJpZM4WCb6B .

mjenczmyk commented 6 years ago

@igbt6 Should we assume that the issue is resolved and can be closed?

luk6xff commented 6 years ago

yep, i think so :) Closed! btw @mjenczmyk - thanks for taking care of the repo and contribs ! I have to assign you as an admin of it :D !