Created
May 1, 2020 10:12
-
-
Save nickp60/9f55d17234f21392172c3d74904e367b to your computer and use it in GitHub Desktop.
download books
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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])) | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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