Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
/ Packt-Book-Grabber Public archive

A Python script for grab free book from PacktPub and more

License

Notifications You must be signed in to change notification settings

locoda/Packt-Book-Grabber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packt-Book-Grabber

A simple Python script for claim free book from PacktPub, and also download from your library.

Installation

First, install all requirements, run following command in root folder:

pip3 install -r requirements.txt

Second, you can check with help of file:

python3 script.py -h

Basic Usage

Basic Configration

You must config your credential.json before you do everything. You can easily make from sample by:

cp credential.json.example credential.json

Please put your user name after "name": and your password after "pass":

Some Sample usage

  1. If you just want to claim a free book:

    python3 script.py -c
  2. If you want to notify yourself with ifttt webhook:

    You have to config the ifttt field in credential.json file. If you don't know what is a key or what is IFTTT, please check with IFTTT - Webhook.

    python3 script.py -n ifttt
  3. If you want to notify yourself with mailgun email service:

    You have to config the mailgun field in credential.json file. You can go to Mailgun to register for a new account (which is free). After login, you can find your api key on your dashboard (find Private API Key in page ) and domain name after clicking Domain tab. If you don't have any domain yourself, the sandbox domain is good to use.

    python3 script.py -n mailgun
    
  4. If you just want to download a book (first book in your library):

    python3 script.py -d 1
  5. If you want to download a book with type epub (default is pdf) to desktop:

    python3 script.py -d 1 -t epub --dir ~/Desktop/
  6. If you want to claim and then download:

    python3 script.py -c -d 1
  7. If you want to upload to dropbox:

    You have to config dropbox field in credential.json file. You can go to Dropbox Developers to create an app for this use. You do have to generate access token and put into credential.json file.

    Note: Upload choice must be used as same time at download

    python3 script.py -d 1 -u dropbox

Further Plan

  • Add Google Drive support
  • Download book from multiple pages

About

A Python script for grab free book from PacktPub and more

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages