Created
May 12, 2016 03:05
-
-
Save julescarbon/2cee013b754cbd4041984bbe35aa9c5a to your computer and use it in GitHub Desktop.
Scraper for Iowa Digital Library http://digital.lib.uiowa.edu/cdm/
This file contains 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
// Download all PDF pages in a book from this library | |
// http://digital.lib.uiowa.edu/cdm/ | |
// http://digital.lib.uiowa.edu/cdm/landingpage/collection/dada | |
// To combine into one PDF - there are some options | |
// https://blog.dbrgn.ch/2013/8/14/merge-multiple-pdfs/ | |
// fast: pdfunite *.pdf output.pdf | |
// best: pdftk *.pdf cat output output.pdf | |
(function(){ | |
var $link = document.querySelector(".co-content-body a") | |
console.log($link) | |
function next (){ | |
console.log($link) | |
$link = $link.parentElement.nextElementSibling.querySelector("a") | |
if ($link) | |
$link.click() | |
setTimeout(function(){ | |
document.querySelector("#download_button").click() | |
console.log('next') | |
setTimeout(next, 3000) | |
}, 3000) | |
} | |
next() | |
})() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment