/springer_free_books

Python script to download all Springer books released for free during the 2020 COVID-19 quarantine

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Python script to download all Springer books released for free during the 2020 COVID-19 quarantine

Usage

Just run the script in the desired folder. It will automatically create a /download/ subfolder and will categorize the books acording the subject.

If you want to manually set a folder to download, insert folder = 'C:/desired_folder/' in main.py.

The books are now organized in sub folders according to the subject ("English Package Name" column).

Now updated to also download epub files if it's available.

If you want just one or two specific books, get the excel file from the folowing link and download just those: https://resource-cms.springernature.com/springer-cms/rest/v1/content/17858272/data/v4

It took about 4 hours to complete the 409 english books (14 GB, both PDF and epub) on my machine.

Usage in a virtual environment:

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python3 main.py

Virtual environment on Windows (Python 3.x):

python -m venv .venv
.venv\Scripts\activate.bat
pip install -r requirements.txt
python main.py

Virtual environment on Windows (Python 2.7.x):

python -m virtualenv .venv
.venv\Scripts\activate.bat
pip install -r requirements2x.txt
python main.py

Source:

Thanks Springer!

Docker container to do all the work

Considering you cloned the repo in a folder, as:

cd \home\[user]\workspace`
git clone https://github.com/alexgand/springer_free_books.git
cd springer_free_books
mkdir downloads

You can run the scripts like that:

docker build . -t springer-image
docker run --rm -v [local_download_folder]:/app/downloads springer-image

and the downloads will be at [local_download_folder]