{"id":13857173,"url":"https://github.com/sknepal/PacktPub-grabber","last_synced_at":"2025-07-13T20:31:08.205Z","repository":{"id":83122801,"uuid":"66148380","full_name":"sknepal/PacktPub-grabber","owner":"sknepal","description":"Grabs Free Learning eBook from PacktPub (everyday) \u0026 notifies You via Email.","archived":false,"fork":false,"pushed_at":"2017-10-06T07:14:42.000Z","size":6,"stargazers_count":23,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-06T03:03:20.828Z","etag":null,"topics":["ebook","packt","packtpub","packtpub-grabber"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sknepal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-20T13:33:23.000Z","updated_at":"2023-12-25T21:25:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b36343b-6b6e-4e57-82e7-b95c4fa043f8","html_url":"https://github.com/sknepal/PacktPub-grabber","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sknepal%2FPacktPub-grabber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sknepal%2FPacktPub-grabber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sknepal%2FPacktPub-grabber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sknepal%2FPacktPub-grabber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sknepal","download_url":"https://codeload.github.com/sknepal/PacktPub-grabber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225912647,"owners_count":17544220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebook","packt","packtpub","packtpub-grabber"],"created_at":"2024-08-05T03:01:28.850Z","updated_at":"2024-11-22T14:32:18.456Z","avatar_url":"https://github.com/sknepal.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# PacktPub Grabber\n\nGrabs [Today's Free Learning eBook from PacktPub](https://www.packtpub.com/packt/offers/free-learning) \u0026 notifies you via Email.\n\n## Dependencies\n\n```sh\npip install -r requirements.txt\n```\nOr, on Arch Linux:\n```sh\npip2 install -r requirements.txt\n```\n## Configuration\nSteps to configure the script.\n\n#### PacktPub Account Information\nReplace USERNAME and PASSWORD on line 8 and 9 with your PacktPub username (email address) and password.\n\n```python\n    br.form[\"email\"] = \"USERNAME\"\n    br.form[\"password\"] = \"PASSWORD\"\n```\n\n#### Email Account Information\n\nThe script sends the email from a Gmail address you specify to your another email address. Note that, only Gmail account is accepted for sending email. I'd advise not to use your existing Gmail account since you need to enable access for less secure apps. \n\n* Create a new Gmail account.\n* [Enable access for less secure apps](https://support.google.com/accounts/answer/6010255?hl=en) on the (new) sending Gmail account.\n* Replace the \"FROM\", \"TO\", and \"EMAIL PASSWORD\" on the last line with your sending Gmail address, receiving Email address and the sending Gmail account's password respectively. \n\n```python\n    send_email(\"FROM\", \"TO\", \"PacktPub Grabber\", outcome, \"EMAIL PASSWORD\")\n``` \nAfter each run, you'll receive an email in the \"TO\" address with the success/failure message.\n\n![Email From PacktPub Grabber](https://cloud.githubusercontent.com/assets/5013296/17832328/c5f7f45c-671f-11e6-986f-cd78133329d4.png)\n\n## Run\nTwo ways to go about running the script.\n\n#### Manually\nTo run manually, simply go to the shell and type:\n\n```python\n    python /path/to/packtpub-grabber/packtpub-grabber.py\n```\n#### Automatically\nSince the purpose of the script is to automate the whole process of getting a free Ebook everyday, you should choose an automated way. So, put the script on your VPS and then setup a cron job so that the script runs everyday on the given time. \n\nRun _crontab -e_ and add the following lines to run the script everday at 6.30 PM. \n\n```\n30 6 * * * python /path/to/packtpub-grabber/packtpub-grabber.py 2\u003e\u003eerrors.log\n```\n\nThe errors, if any, can be viewed on errors.log file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsknepal%2FPacktPub-grabber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsknepal%2FPacktPub-grabber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsknepal%2FPacktPub-grabber/lists"}