Packt Publishing have a lot of good premium books and everyday they put up a premium book for download for free. You could get a premium book a day by going to the Free Learning eBook page. I chose to automate the process and have the book grabbed automatically to my PacktPub account everyday. I have made the script available on Github for anyone who is interested to do the same: PacktPub Grabber.
The script uses a python module to perform the browsing and logging in into the site, another module to parse the location of the HTML elements that are important to us and then simply emulates the clicking of the “Claim Your Free Book” button. Finally, you will receive an email to the account of your liking letting you know whether the process was successful, and if successful, the title of the premium book that was grabbed for free. In order to receive the email, you need to provide username and password of the sending Gmail address.
Anyway, here’s how you would get it to work:
- Sign up on PacktPub (it’s free.)
- Follow the guidelines on the Github repo.
- ????
- Profit!!!
By the way, the automated process is useful only if you have a Virtual Private Server (VPS) or some computer that is always-on. I had a VPS, but you could maybe use a free alternative such as https://www.pythonanywhere.com (I am not sure if it’ll work).
Note that it was made on Python 2.7. If you have any queries, you can leave them down below.
Thank for reading through! Till next time.
Subigya Nepal (@SkNepal)
August 21, 2016 @ 6:18 am
Grab PacktPub Free Learning eBook Everyday Automatically: https://t.co/jxVSWzSnjf via