Created
September 23, 2018 15:30
-
-
Save lukaskollmer/378592e8746f0d249831396af13ddb11 to your computer and use it in GitHub Desktop.
Extract download urls from archives.gov
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
// Extracts the download urls from a table of links to files | |
// 1. run the script below in your browser's console | |
// 2. copy the printed urls, save to text file | |
// 3. `wget -i YOUR_TEXT_FILE` | |
const main = document.getElementById('block-system-main'); | |
const table = main.children[main.children.length - 1].children[0].children[0]; | |
const rows = Array.from(table.children[0].children) | |
rows.splice(0, 1) | |
console.log(rows.map(row => row.children[0].children[0].href).join('\n')); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment