Skip to content

Instantly share code, notes, and snippets.

@abalaci
Created May 4, 2020 19:21
Show Gist options
  • Save abalaci/7d26b752dec1f0812038b3cbd30ad031 to your computer and use it in GitHub Desktop.
Save abalaci/7d26b752dec1f0812038b3cbd30ad031 to your computer and use it in GitHub Desktop.
A Bash script to download free e-books from Springer.
#! /bin/bash
mkdir springer-open
cd springer-open
wget -O "search-results.csv" "https://link.springer.com/search/csv?facet-language=%22En%22&facet-content-type=%22Book%22&package=openaccess"
gawk -vFPAT='[^,]*|"[^"]*"' 'NR>1 { gsub(/"/, "", $6); print "https://link.springer.com/content/epub/" $6 ".epub" }' "search-results.csv" > "items.csv"
wget -w 3 -t 0 --content-disposition -i items.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment