Skip to content

Instantly share code, notes, and snippets.

@mhsattarian
Last active April 30, 2020 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhsattarian/1b84826a81f1671a7dc048c98e6e47b1 to your computer and use it in GitHub Desktop.
Save mhsattarian/1b84826a81f1671a7dc048c98e6e47b1 to your computer and use it in GitHub Desktop.
Springer Publications has recently released a huge list of books that are now free to access, Lets grab download links fr

Download Springer Free Ebooks

Springer Publications has recently released a huge list of books that are now free to access, Let's grab download links for them.

Ebook links

List of books is available as an google sheet. you can also use this repository to download them. but, it's a python script to download them and is probably slow and as far as I checked is not using download managers like aria2, so I decided to grab the download links automatically and download them using IDM.

Grab download links

in order to grab the download links for each URL in the spreadsheet which is a mirror link to the book page, you can use an IMPORTXML function to grab the link from the page using XPATH.

here is the command to grab the link to PDF file:

=CONCATENATE("https://link.springer.com", INDEX(IMPORTXML(<BOOK PAGE URL HERE>, "//div[@class='main-container']/div/div[2]/div//a[1]/@href"), 1, 1))

In the end (surprisingly it takes a long time to finish grabbing links for all 410 books) you can have a direct download link for the books.

for grabbing the EPUB link (which by the way is not available for all books), I didn't do exactly the same, because of the time it took, but it could be done using the exact command with a small change making the row index (first 1 at the end of the command) to 2. so I Just used a replace command to create EPUB links, although these links may be broken, cause not all books had the EPUB version available.

here is the command:

=SUBSTITUTE(SUBSTITUTE(W3, "pdf", "epub"), "content", "download")

after that, you should have a spreadsheet just like mine, available here.

so now in order to download them, select the range you want, copy them, paste them in a text file and use IDM, or aria2 as explained below:

IDM

import the file containing the links as shown below and start the download procedure. IDM screenshot

aria2 run the command below to download all links in the file downloadall.txt, with 5 downloads simultaneously, and save in the Springer-pdfs directory:

aria2c -i ./downloadall.txt -d Springer-pdfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment