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:
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.
- Grab Certain Texts From Gmail via Google Spreadsheet (Script)
- RSS Feed for Amazon Kindle Top 100 Free Best Sellers
- Convert Fortinet’s Fortiguard WebFilter logs to CSV Format
- Run And Kill: Open a program and close it automatically after certain time
- Get Microsoft DreamSpark Account (& Some Free Products Along With It)