Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nickp60/9f55d17234f21392172c3d74904e367b to your computer and use it in GitHub Desktop.

Select an option

Save nickp60/9f55d17234f21392172c3d74904e367b to your computer and use it in GitHub Desktop.
download books
searchres <- "~/Downloads/SearchResults.csv"
outdir <- "~/Downloads/springercovid/"
dir.create(outdir)
resdf <- read.csv(searchres, stringsAsFactors = FALSE)
resdf$dloadurl <- paste0("http://link.springer.com/content/pdf/",
gsub("\\/", "%2F", fixed=TRUE, resdf$Item.DOI), ".pdf")
resdf$local_file <- paste0(gsub(" +", "_", gsub("[^[:alnum:][:space:]]", "", resdf$Item.Title)), ".pdf")
for (i in 1:nrow(resdf)){
download.file(resdf$dloadurl[i], file.path(outdir, resdf$local_file[i]))
}
@nickp60
Copy link
Author

nickp60 commented May 1, 2020

get the search results from "Free Textbooks and Library Link special issue during Covid 19", click download results. https://link.springer.com/search/page/10?facet-content-type=%22Book%22&package=mat-covid19_textbooks&facet-language=%22En%22&sortOrder=newestFirst&showAll=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment