Last active
August 29, 2015 14:26
-
-
Save leotm/8df7a7d4b054ed2d08e9 to your computer and use it in GitHub Desktop.
Download all links from website
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
var links = []; | |
// Replace .ext with desired filetype | |
Array.prototype.map.call(document.querySelectorAll("a[href$=\".ext\"]"), | |
function(e, i) { | |
if ((links || []).indexOf(e.href) == -1) { links.push(e.href); } | |
}); | |
console.log(links.join(" ")); | |
// Copy result to clipboard | |
// Run wget <paste> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment