Giter VIP home page Giter VIP logo

springer_free_books's Introduction

The script is not working anymore, due to the reCAPTCHA step Springer added.

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

Python package and testrun

Books available

It used to have 409 english books (it took about 4 hours to complete the download ~ 14 GB, both PDF and EPUB, on my machine), but Springer has since removed some of them from the open access.

Usage

Note: If you want just one or two specific books, get the excel file and manually download those or use the script to help you download (see Download book selectively sub-section).

By default the script stores the books in ./downloads subfolder according to the subject ("English Package Name" column of the excel file).

Download all English books (PDF and EPUB)

Use the following command to download all PDF and EPUB books to the default download folder ./downloads

python3 main.py

To download them to a subfolder of your choice, say books

python3 main.py -f ./books

You can download to an absolute path, say C:/ebooks/springer/

python3 main.py -f C:/ebooks/springer/

To download books in separate chapters (PDF only)

python3 main.py --dl_chapters

Download all German books (PDF and EPUB)

To download the German books use

python3 main.py --lang de

This language flag can be combined with any of the above and below mentioned options. If not specified, --lang en, i.e. English, is the default.

Download all books of specific format

To download all PDF books only, run

python3 main.py --pdf

or all EPUB books only

python3 main.py --epub

Download only specific book categories

You can download selective books by categories. Make sure category name with space(s) is enclosed in double quotation marks, like so

python3 main.py -c Engineering "CoMpuTer sciEnCe"

The category name is case-insensitive.

Download book selectively

You can download books by indices (refer to the excel file for the titles)

python3 main.py -i 2 345 70 90 0 213

Verbose mode

If you need to know what you are downloading, enable the verbose mode with -v option

python3 main.py -v -c "Behavioral science and psychology" "chaos AD" UFO "Life science" -i 2 34 400

You will get the following summary before the downloading starts

                                          Book Title               English Package Name
2                                  All of Statistics         Mathematics and Statistics
34                            Essential Astrophysics              Physics and Astronomy
37       International Perspectives on Psychotherapy  Behavioral Science and Psychology
40                         Applied Behavior Analysis  Behavioral Science and Psychology
70                          Psychology of Perception  Behavioral Science and Psychology
95             Handbook of Consumer Finance Research  Behavioral Science and Psychology
311       Clinical Methods in Medical Family Therapy  Behavioral Science and Psychology
313                           Motivation and Action   Behavioral Science and Psychology
381                          Perceptual Organization  Behavioral Science and Psychology
396  Evidence-Based Practice in Clinical Social Work  Behavioral Science and Psychology
397                 Foundations of Behavioral Health  Behavioral Science and Psychology
398                      Social Psychology in Action  Behavioral Science and Psychology
400             A Course in Rasch Measurement Theory                          Education

13 titles ready to be downloaded...
The following invalid book categories will be ignored:
 1. chaos AD
 2. UFO
 3. Life science

Running in a virtual environment (Bash commands):

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

Virtual environment on Windows (auto-detects Python version):

Just double-click the run_VirtualEnv.bat file from Windows Explorer, or type-in its name at the command-line and press ENTER. Do install Python first, either from python.org or from the Microsoft Store for Windows 10.

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 requirements.txt
python main.py

Sources:

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].

Troubleshooting

On macOS, if the script produces a [SSL: CERTIFICATE_VERIFY_FAILED] error, then security certificates may need to be installed. Instructions for doing so can be found here. If that doesn't work, see alternate instructions here.

springer_free_books's People

Contributors

alexgand avatar alexgv99 avatar azalea avatar bananabr avatar birbilis avatar cclauss avatar chaosad avatar danieljing avatar dovyski avatar haeckelk avatar ivel91 avatar joshdabosh avatar jqueguiner avatar jstnmchl avatar justinallennz avatar lecafard avatar marlonchalegre avatar mutantacule avatar parthagar avatar pjungermann avatar rencire avatar rholais avatar spiritsree avatar tedder avatar viidix avatar vikashkothary avatar vspur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

springer_free_books's Issues

Problem with temporary directory in Windows OS

Inside helper.py the subfolder "./tmp" is not welcomed in my Windows 10
I have replaced the line path = create_path('tmp')
with path = create_path(os.path.join(book_path, 'tmp'))

I have added also a shutil.rmtree(os.path.join(book_path, 'tmp'))
at the end of the _download_book(url, book_path) function

I made the workaraound without inspecting the whole code. But it is working fine now in my Windows machine. I thinks it is also compatible with other OS's as I have used os.path.join without the os.path.sep, but I have not tested it.

If both pdf and epub are available, download only pdf

I noticed that there are several books which have both pdf and epub available. The current script downloads both, creating a lot of duplicate files. It would be nice to only download pdf if epub and pdf both are available.

Download doesn't complete

Mine is stopping at 63% (255/407).

Traceback (most recent call last):
  File "main.py", line 64, in <module>
    myfile = requests.get(new_url, allow_redirects=True)
  File "C:\Users\...\venv\lib\site-packages\requests\api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\...\venv\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\...\venv\lib\site-packages\requests\sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\...\venv\lib\site-packages\requests\sessions.py", line 683, in send
    r.content
  File "C:\Users\...\venv\lib\site-packages\requests\models.py", line 829, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
MemoryError

Any guidance here?

possible bug in macOS

Trying to download all the books. After having installed the requirements, the process completes (in only ~1 minute) but there is not any book in the respective folders. macOS limitation? Is the code only prepared for windows?

Workaround just FYI

To circumvent redownloading aborted downloads you can just add:

import os
import curlify as cy

and replace the two open(new_folder+final, 'wb').write(myfile.content) statements with:

os.popen("{}{}\"{}\"{}".format(cy.to_curl(myfile.request), " -o ", new_folder+final, " -C -").replace("'", "\""))

Assumes a working curl binary nonetheless on your system.

object of type 'float' has no len()

I tried running the simple python3 main.py after installing the dependencies but I got the following error:

[~]:python3 main.py

387 titles ready to be downloaded...
Traceback (most recent call last):
File "main.py", line 95, in <module>
download_books(books, folder, patches)
File "/mnt/c/Users/bounc/Desktop/springer_free_books/helper.py", line 126, in download_books
longest_name = books[CATEGORY].map(len).max()
File "/home/mlindn/.local/lib/python3.8/site-packages/pandas/core/series.py", line 3630, in map
new_values = super()._map_values(arg, na_action=na_action)
File "/home/mlindn/.local/lib/python3.8/site-packages/pandas/core/base.py", line 1145, in _map_values
new_values = map_f(values, mapper)
File "pandas/_libs/lib.pyx", line 2329, in pandas._libs.lib.map_infer
TypeError: object of type 'float' has no len()

I am running this on Ubuntu 20.04 WSL

HTTP Error 404 Not Found but I was able to manually download spreadsheet

~/repos/springer_free_books$ python3 main.py
Traceback (most recent call last):
File "main.py", line 37, in
books = pd.read_excel(table_url)
File "/home/ddarden/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 188, in wrapper
return func(*args, **kwargs)
File "/home/ddarden/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 188, in wrapper
return func(*args, **kwargs)
File "/home/ddarden/.local/lib/python3.8/site-packages/pandas/io/excel.py", line 350, in read_excel
io = ExcelFile(io, engine=engine)
File "/home/ddarden/.local/lib/python3.8/site-packages/pandas/io/excel.py", line 653, in init
self._reader = self._enginesengine
File "/home/ddarden/.local/lib/python3.8/site-packages/pandas/io/excel.py", line 402, in init
filepath_or_buffer = _urlopen(filepath_or_buffer)
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED]

Hi. Thanks a lot for this useful script. I tried to set it up on my macOS Catalina. I used the virtual environment by following your steps. The requirements have been installed. When I'm running the main.py using python3 main.py, I got the ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] like the error log below. How to fix it?

Python version

% python
Python 3.7.3 (default, Nov 15 2019, 04:04:52)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin

Error log

Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect
    server_hostname=server_hostname)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 853, in _create
    self.do_handshake()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 1117, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 38, in <module>
    books = pd.read_excel(table_url)
  File "/Volumes/Transcend2TB/Books/springer_free_books/.venv/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 304, in read_excel
    io = ExcelFile(io, engine=engine)
  File "/Volumes/Transcend2TB/Books/springer_free_books/.venv/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 824, in __init__
    self._reader = self._engines[engine](self._io)
  File "/Volumes/Transcend2TB/Books/springer_free_books/.venv/lib/python3.7/site-packages/pandas/io/excel/_xlrd.py", line 21, in __init__
    super().__init__(filepath_or_buffer)
  File "/Volumes/Transcend2TB/Books/springer_free_books/.venv/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 342, in __init__
    filepath_or_buffer = BytesIO(urlopen(filepath_or_buffer).read())
  File "/Volumes/Transcend2TB/Books/springer_free_books/.venv/lib/python3.7/site-packages/pandas/io/common.py", line 141, in urlopen
    return urllib.request.urlopen(*args, **kwargs)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>

Missing titles

The script throws an error on missing titles. An example:

FileNotFoundError: [Errno 2] No such file or directory:
'C:\Users\david\Desktop\springer_free_books-master\
springer_free_books-master\downloads\
Literature, Cultural and Media Studies\
An Anthology of London in Literature,
ย 1558-1914 - Geoffrey G. Hiller, Peter L. Groves,
Alan F. Dilnot, 1st ed. 2019 - 978-3-030-05609-4.pdf'

The missing titles:
"Optimization of Process Flowsheets through Metaheuristic Techniques "

"Foundations of Analytical Chemistry"

"Clinical Methods in Medical Family Therapy"

"An Anthology of London in Literature, 1558-1914"

to fix it, remove the titles from the list one by one:
books = books[books["Book Title"]!=]

I think a try except would be better though.
try:
download_book(new_url, output_file)
except:
continue

AttributeError: 'Int64Index' object has no attribute 'array'

After ran python3 main.py -f ./books, I got the following error.

Traceback (most recent call last):
  File "main.py", line 70, in <module>
    books.index = [i + 2 for i in books.index.array]        # Recorrect indices
AttributeError: 'Int64Index' object has no attribute 'array'

python 3.7.5
ubuntu 19.10

Somebody please mirror and make a torrent

Somebody please try to collect all the files you can and make and seed a torrent of it, especially since some were removed. Seems dumb to rely on the script to keep working when the source is hostile (removing stuff, for example). Should have a backup for if one day it appears to have all disappeared from source.

Torrents are an amazing technology when they aren't being purposely neutered (private torrents) or opposed for near-sighted or misguided or otherwise stupid reasons

HTTP Error 404: Not Found

The link to the Excel file seems to be broken. When you visit the link in main.py you get: {"projectVersion":"2.245.0-54832206c2d4e90345d71a4427e7542e623e43bf-2020-04-23_08:48:48.0010-local-1","requestUri":"https://resource-cms.springernature.com/springer-cms/rest/v1/content/17858272/data/v4","message":"com.springer.cms.service.ContentNotFoundException: No Content found for Version: 4 with Content-Id: coremedia:///cap/content/17858272","responseCode":404}

Check file after downloading and redownload if corrupt?

I used the script to download 14GB worth of files and more than 60% of them turned to be corrupt files to due to incomplete downloads.
Would be great if somehow we could check that the downloaded file is not corrupt.
If corrupt: reinitiate download.

Duplicate downloading the pdf files as epub

When downloading everything with python main.py command (using python 3), noticed that the epub and pdf files are exactly the same.

Seems like the issue is similar to #36, although root cause might be different?

Nothing is happening after creating the first folder

Hi,
I tried running the script as is and the progress bar was stuck at 0%.

While debugging I noticed that requests.get() is not finishing. It keeps on running without finishing or time out. Not sure what can be done in this scenario.

Possible Introduction of reCaptcha by Springer?

Hi all,

I am not reporting an issue about the code, but just to share about what I encountered yesterday. While I was amending and testing the code, I was greeted with reCAPTCHA page. When I tried downloading manually, it indicated that the server was overloaded. However, the reCAPTCHA disappeared after about an hour or so later.

I believe Springer are aware that their free e-books are being downloaded by bots and has already put in place the reCAPTCHA, waiting to appear when overloaded with suspicious downloads. If we don't play nice, I reckon they might permanently enforce the reCAPTCHA downloading policy. Once that happens, then that will be the end to this automated download.

image

Please share the archive

Hello. Can anyone share a full archive of books on cloud or via torrent, with partial download capability? Currently, i cannot use this script for do this.

GUI? Available if you want one.

Awesome program!

I've added a GUI onto your code and replaced tqdm with a graphical progress meter that includes stats and a mechanism to cancel the operation. It only changed 7 lines in the code.

A GUI provides a number of benefits at little / no cost

  • Setting the location to save without modifying the source code
  • A progress meter with stats
    • Shows overall progress
    • Shows time remaining
    • Ability to "cancel" the download in a safer manner than a Control C or killing the process
  • Popup error messages so that you can run the entire program without a console
  • Can distribute as an EXE file / py file that runs without a console

I forked your project and made the changes to my version. I didn't want to do a pull request as you may be fine with running on the command line, or maybe want to enable both modes by adding a "-gui" parameter when the program is started. It's your project so don't want to be presumptuous about any changes I made. If you're not interested, no problem, I'll just rename my version so there's no confusion.


GUI Screenshots

Startup

You can copy and paste the folder location into the window or use the Browse button.

image

After the download starts, the progress meter is shown that shows the current book as well as stats about time spent so far and time remaining (based on how long it's taken so far)

image

If you click "cancel" or close the progress meter window, then you'll be shown another popu-up window so that you understand why the download has stopped and the program exited

image


Possible confusing situation with "not responsive" message.

Because the GUI was added on top of code that blocks for long periods of time while downloading, Windows will sometimes display a "not responsive" message then the user tries to cancel the operation.

The problem could be solved by threading the downloading portion so that it doesn't simply pend for long periods of time, but the added complexity isn't likely worth it. A simple message "Your program hasn't locked up, it just looks busy during downloading" would explain the situation to users if desired.

Import Error: No module names requests

I am getting following error while running main.py on version 2.7.15

ฮป python main.py
Traceback (most recent call last):
File "main.py", line 4, in
import requests
ImportError: No module named requests

I tried docker way as well and getting following error
ฮป docker run --rm -v E:/Tech/eBooks-PDFs-RefCards/springer_free_books:/app/downloads springer-image
/usr/bin/env: โ€˜python\rโ€™: No such file or directory

Unable to install requirements

Python version: 3.5.2
OS: Ubuntu 16.04.5 LTS

After activating the venv, and launching the command "pip install -r requirements.txt"

I get an error:
`Collecting certifi==2020.4.5.1 (from -r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/57/2b/26e37a4b034800c960a00c4e1b3d9ca5d7014e983e6e729e33ea2f36426c/certifi-2020.4.5.1-py2.py3-none-an>
Collecting chardet==3.0.4 (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting et-xmlfile==1.0.1 (from -r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz
Collecting idna==2.9 (from -r requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whl
Collecting jdcal==1.4.1 (from -r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/f0/da/572cbc0bc582390480bbd7c4e93d14dc46079778ed915b505dc494b37c57/jdcal-1.4.1-py2.py3-none-any.whl
Collecting numpy==1.18.2 (from -r requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/ff/18/c0b937e2f84095ae230196899e56d1d7d76c8e8424fb235ed7e5bb6d68af/numpy-1.18.2-cp35-cp35m-manylinux1>
Collecting openpyxl==3.0.3 (from -r requirements.txt (line 7))
Using cached https://files.pythonhosted.org/packages/95/8c/83563c60489954e5b80f9e2596b93a68e1ac4e4a730deb1aae632066d704/openpyxl-3.0.3.tar.gz
Collecting pandas==1.0.3 (from -r requirements.txt (line 8))
Using cached https://files.pythonhosted.org/packages/2f/79/f236ab1cfde94bac03d7b58f3f2ab0b1cc71d6a8bda3b25ce370a9fe4ab1/pandas-1.0.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-gs8_q9nv/pandas/setup.py", line 42
f"numpy >= {min_numpy_ver}",
^
SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-c8xdz0d6/pandas/
You are using pip version 8.1.1, however version 20.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
`
No idea what I am doing wrong. Any help would be much appreciated. Thanks in advance

in windows : import pandas report error ImportError: DLL load failed while importing aggregations:ๆ‰พไธๅˆฐๆŒ‡ๅฎšๆจกๅ—

today I down the latest code to run in windows,when I run "python3 main.py" directly,it dosen't work.(I forgot the error message..sorry,but it about pandas).
Then I use it in windows Virtual environment ,all package download completed, run the cmd as readme.md describe bellow:
python -m venv .venv
.venv\Scripts\activate.bat
pip install -r requirements.txt
python main.py

and then it report an error: DLL load failed while importing aggregations:ๆ‰พไธๅˆฐๆŒ‡ๅฎšๆจกๅ—. and stop work.

I searched from internet and found the reason,pandas new version 1.0.2 and 1.0.3 forgot to import vs2015 runtime in it.
you have tow ways to fix it,
one is install vs2015 runtime in windows youself.
another is to rollback to pandas 1.0.1 ,cmd :"pip install pandas==1.0.1".
I used the second way to fix it.

Syntax error

image

How do I overcome this error?

I have changed my download folder
image

No other changes done.

Disparity between book counts / total sizes

Hi! Great project!

After getting dependencies installed, the download went without errors. But I'm wondering about the result...

https://link.springer.com/search?facet-content-type=%22Book%22&package=mat-covid19_textbooks&%23038;facet-language=%22En%22&%23038;sortOrder=newestFirst&%23038;showAll=true says there are 473 books, 407 of which are in English.

The readme says there are "409 english books (14 GB, both PDF and EPUB)"

My download directory says there are 409 objects, totaling 6.5 GB. Digging into directories shows both PDFs and EPUBs.

  1. Why is the size so much lower than in the readme?
  2. If there are 407 books, how does that become only 409 files, when most books seem to be represented by 2 files each (PDF and EPUB)? (I would have expected more like 814 files, unless only a handful of books were available in both formats.)

I just found all the download links

The script is too slow, only 6 books took 4hours!!
i just found all the direct links you may need
You can copy the links to software like "IDM". It will save you a lot of time.

https://link.springer.com/content/pdf/10.1007%2F978-0-387-72579-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-75959-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-44794-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-26551-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-32862-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-45171-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-56475-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-20059-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-54486-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-7288-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-46950-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-2766-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-10-5218-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-65439-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-65094-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-59978-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-77425-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-95762-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-92333-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-56707-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-97298-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-02405-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-72000-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-05900-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-13005-3.pdf
https://link.springer.com/content/pdf/10.1007%2Fb100747.pdf
https://link.springer.com/content/pdf/10.1007%2Fb100507.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-21736-9.pdf
https://link.springer.com/content/pdf/10.1007%2Fb99417.pdf
https://link.springer.com/content/pdf/10.1007%2Fb97469.pdf
https://link.springer.com/content/pdf/10.1007%2F0-387-28117-7.pdf
https://link.springer.com/content/pdf/10.1007%2Fb104645.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-32353-4.pdf
https://link.springer.com/content/pdf/10.1007%2F0-387-36218-5.pdf
https://link.springer.com/content/pdf/10.1007%2F0-387-36274-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-37575-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-40065-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-46271-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-49312-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-72071-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-74365-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-76501-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-77650-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-78341-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-79054-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-84858-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-87573-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-88698-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-88963-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-93837-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4020-6099-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4020-6808-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-35963-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-44874-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-03762-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-56194-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-0400-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-27877-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-9479-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-18842-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-48936-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-21239-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-7091-0715-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-6488-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-01851-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-3058-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-46321-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-13072-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-4556-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-37434-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-10-2045-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-57040-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-23042-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-53883-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-90-481-2516-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4899-7454-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-53785-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-51118-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-57589-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-1120-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-44738-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-05699-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-47831-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-31791-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-54083-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4612-1844-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-84800-070-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-19864-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-61088-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-46162-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-33916-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-30250-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-1194-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4613-0139-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-54064-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-7116-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-43341-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-0641-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-5653-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-12682-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-7307-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-53045-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-33143-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-31089-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-12742-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-52250-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-5134-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-28887-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-9504-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-8349-6331-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-84882-935-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-07806-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-14142-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-37314-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-20951-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-50091-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-540-77974-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-19596-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-53022-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-4474-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-37902-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-46394-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-6374-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4612-4374-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-59731-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-22309-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-30319-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-2212-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-49887-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-007-5757-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-14941-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-2122-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-58307-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-6271-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-21936-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-09351-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-21990-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-9170-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-55309-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-5201-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-2614-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-20451-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4612-4360-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-09171-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-007-1171-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-23012-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-4809-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-0925-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-658-07884-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-27265-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-57883-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-31650-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-01195-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-54349-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-43715-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-4560-67-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-23428-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-007-1211-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-27104-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-55444-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-63913-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-44561-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-34132-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-3954-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-29854-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-55615-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-46407-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-9982-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-53919-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-24551-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-10-1802-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-6419-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-6572-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-84800-322-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-6940-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4612-0979-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-11080-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-30304-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-29716-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-04101-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-24346-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-2712-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-7630-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-33405-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-31036-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-1151-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-40975-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-3618-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-10091-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-3523-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-62872-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-5538-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-00401-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-03623-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-19464-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-20556-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-6227-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-54398-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-13809-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-017-8771-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-2113-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-22951-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4419-6646-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-65867-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-7138-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-00894-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-44048-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-12493-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-9236-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-287-212-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-642-28980-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-29791-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-84628-642-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-51412-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-20600-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-19425-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-54817-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-44127-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-6786-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-24331-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-50651-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-3987-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-540-93804-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-8933-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-50319-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-39439-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-57750-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-05290-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-01769-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-007-6863-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-0867-7.pdf
https://link.springer.com/content/pdf/10.1007%2F1-84628-168-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-540-69934-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-49810-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-14240-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-21173-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-658-10183-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-45776-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-1911-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-15195-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-7807-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4757-0576-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-29659-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-6486-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-6642-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4899-7550-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-540-32899-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-24280-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-3143-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-19587-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-2623-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-540-27752-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-50017-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-7946-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-61185-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-18539-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-16874-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-25970-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-6849-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-34195-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-017-7242-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-15666-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-23880-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-49875-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-18398-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-007-6113-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-2197-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-14777-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-9138-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4612-1272-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-5361-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-5601-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4471-6684-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-9126-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4757-2519-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-55606-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-57252-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-25675-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-8687-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4614-4262-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-44899-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-0-387-71481-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-14454-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-48848-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-49849-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-58715-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-64786-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-65451-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-6676-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-61158-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-66631-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-70920-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-70790-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-63133-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-49279-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-64410-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-66772-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-68588-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-68598-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-72547-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-58487-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-67395-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-73004-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-66219-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-75771-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-73123-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-94-024-1144-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-56272-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-56509-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-68834-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-73132-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-72682-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-65682-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-77649-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-76442-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-78729-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-349-95348-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-68301-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-78361-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-77809-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-55381-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-0399-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-91041-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-74965-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-57265-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-1090-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-78181-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-89491-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-91722-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-72911-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-91575-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-92207-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-95381-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-63588-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-91890-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-89292-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-72314-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-75502-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-75708-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-92804-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-94463-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-92429-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-2475-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-94313-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-98833-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-77434-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-91155-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-96622-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-96713-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-00581-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-10-8297-9.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-10-8321-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-0785-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-75804-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-99516-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-99118-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-02604-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-03255-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-94743-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-2023-1.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-00464-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-00467-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-01279-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-04516-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-71288-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-05609-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-74373-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-96337-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-6643-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-10552-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-98875-7.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-12489-2.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-3621-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-74746-0.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-13605-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-12727-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-13020-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-15671-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-11117-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-15224-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-18435-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-13788-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-319-68837-4.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-7496-8.pdf
https://link.springer.com/content/pdf/10.1007%2F978-981-13-8759-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-19182-5.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-030-25943-3.pdf
https://link.springer.com/content/pdf/10.1007%2F978-1-4939-9621-6.pdf
https://link.springer.com/content/pdf/10.1007%2F978-3-662-56233-8.pdf

Where are the downloaded files?

Hi, thanks a lot for this program ... but I cannot find the downloaded files. I tried various versions of

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

Downloaded files are not visible.

Hello,

I am not able to see the download content in my local directory. Is it download somewhere else?
I clone this repo and created the downloads folder in springer_free_books folder.
I used following command to download the content:

  1. sudo docker build . -t springer-image
  2. sudo docker run --rm -v downloads springer-image

After completion of 100% I am not able to see any of the book in the local folder which pointed in second command. Please help me to get the content?

Incomplete downloaded book considered valid after restarting script

For some reason if a user hit Ctrl+C or Ctrl+Break, the incomplete downloaded book would be considered a valid book and would not be replaced on restarting the script.

Also on restart, if a PDF file is present (but incomplete, due to Ctrl+C or Ctrl+Break), its EPUB will be skipped.

Error: probably not a valid book

Hello, do you have any ideas why it's not downloading any of the books? I have all the dependencies and the python code seems to be running, but ot doesn't download anything right now, skipping every book.

Does it mean that Springer recovered all the books from their site?

Thanks!

image

Download fails around 4%, "File name too long" & NameError: name 'time' is not defined

Python version: 3.7.2
OS: Ubuntu 16.04.5 LTS

I finally managed to get the script going, however after some downloads (aroud 4%) the script throws up a bunch of errors and exits, leaving the download half-way. Re-running the script results in the same issue repeatedly.

Any help in resolving this issue will be much appreciated. Thanks in advance.

`[Errno 36] File name too long: './downloads/Medicine/Primer on the Rheumatic Diseases - John H. Klippel, John H. Stone, L eslie J. Crofford, Patience H. Whi>

  • Problem downloading: Primer on the Rheumatic Diseases, so skipping it.
    Traceback (most recent call last):
    File "/usr/lib/python3.7/shutil.py", line 566, in move
    os.rename(src, real_dst)
    OSError: [Errno 36] File name too long: './tmp/-temp_file-.bak' -> './downloads/Medicine/Primer on the Rheumatic Diseases - John H. Klippel, John H. Sto>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xuxo/dl/videos/_descargados_a_ordenar/Springer_Books/springer_free_books/helper.py", line 113, in download_selected_books
download_book(request, output_file, patch)
File "/home/xuxo/dl/videos/_descargados_a_ordenar/Springer_Books/springer_free_books/helper.py", line 90, in download_book
_download_book(new_url, output_file)
File "/home/xuxo/dl/videos/_descargados_a_ordenar/Springer_Books/springer_free_books/helper.py", line 83, in _download_book
shutil.move(tmp_file, book_path)
File "/usr/lib/python3.7/shutil.py", line 580, in move
copy_function(src, real_dst)
File "/usr/lib/python3.7/shutil.py", line 266, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.7/shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
OSError: [Errno 36] File name too long: './downloads/Medicine/Primer on the Rheumatic Diseases - John H. Klippel, John H. Stone, L eslie J. Crofford, Patien>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 73, in
download_selected_books(books, folder, patches)
File "/home/xuxo/dl/videos/_descargados_a_ordenar/Springer_Books/springer_free_books/helper.py", line 119, in download_selected_books
time.sleep(30)
NameError: name 'time' is not defined

`

Problem with Docker/Raspberry Pi

I ran out of storage space on my MacBook, so I tried running this script on my Raspberry Pi instead. I was using Docker on my Raspberry Pi, So I decided to choose a way to create a Docker image by Dockerfile. However, this method failed.

After reviewing the log, I realized that some packages defined in requirements.txt had to be compiled to work in my environment. However, the base image applied to the Dockerfile is a "slim" version that lacks some elements needed for compiles. That's the cause of the error. So I solved the problem by changing the base image from python:3.8-slim-buster to python:latest. The Docker image created in this way took a long time to create, but it worked perfectly on my Raspberry Pi.

However, this simple solution has a little problem. The size of the pulled image becomes quite large. Therefore, this solution may be inconvenient for some people. This script is used to download a large amount of data, but it would still be better to have less download capacity. So I want to discuss this.

My environment:

  • Raspberry Pi 4 Model B 4GB (aarch64)
  • Ubuntu Linux 20.04 LTS (Focal Fossa) 64-bit
  • Docker 19.03.8

KeyError: 'content-length'

In some occassions (eg. in my case indices 295 and 331), the script abandons with "KeyError: 'content-length'". I printed the request.headers and it appears that specific key was not present.

Full stack trace
Traceback (most recent call last):
File "C:\Users...\OneDrive\Documenten\7. Source\Repos\springer_free_books\main.py", line 88, in
download_books(books, folder, patches)
File "C:\Users...\OneDrive\Documenten\7. Source\Repos\springer_free_books\helper.py", line 137, in download_books
download_book(request, output_file, patch)
File "C:\Users...\OneDrive\Documenten\7. Source\Repos\springer_free_books\helper.py", line 91, in download_book
file_size = int(req.headers['Content-Length'])
File "C:\Users...\AppData\Roaming\Python\Python37\site-packages\requests\structures.py", line 52, in getitem
return self._store[key.lower()][1]
KeyError: 'content-length'

Can't get the requirements to work

I'm not normally using python at all.
Aparently pip can't find any of the requirements.
(The machine is online via IPv6. I tested by also giving the machine some legacy IPv4. No improvement.)

How do I tell it where to look for these requirements?
(The requirements listed also don't exist as Debian packages to install them manually, without pip.)

Example:

/tmp# python3 -m venv .venv
/tmp# . .venv/bin/activate
(.venv) 
/tmp# pip install -r requirements.txt
Collecting certifi==2020.4.5.1 (from -r requirements.txt (line 1))
  Could not find a version that satisfies the requirement certifi==2020.4.5.1 (from -r requirements.txt (line 1)) (from versions: )
No matching distribution found for certifi==2020.4.5.1 (from -r requirements.txt (line 1))

[Feature Request] Springer's 1000 open-access books

Earlier this month Springer published their 1000th open access book:
https://www.springernature.com/gp/researchers/campaigns/celebrating-1000-open-access-books

A full CSV file, similar to the one released in the Covid-19 collection is available here:
https://link.springer.com/search/csv?facet-content-type=%22Book%22&package=openaccess

Having looked at download_books() from helper.py and the column headers of the CSV file from above, I think a simple rename of the headers should be enough. URLs are similar. However:

  • Electronic ISBN and English Package Name columns are not available. This will alter the folder structure
  • Further, Edition is limited to just publication years.

Is this something that is straightforward and can be integrated easily?

Running in Windows

I had to modify the commands to run in Windows to this:

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

ERROR: Could not open requirements file

i cannot install requirements.txt.
im using win10, phyton 3.8

C:\Program Files\Python38>python3 -m venv .venv

C:\Program Files\Python38>.venv/bin/activate
'.venv' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\Python38>.venv\Scripts\activate.bat

(.venv) C:\Program Files\Python38>pip install -r requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

New.

Sorry I am new to Python and I do not understand how to download the files, could somebody or the author please help me, I would greatly appreciate it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.