Skip to content

Instantly share code, notes, and snippets.

@ninetails
Created March 9, 2016 19:53
Show Gist options
  • Select an option

  • Save ninetails/270bee8eb4a9f319cdb8 to your computer and use it in GitHub Desktop.

Select an option

Save ninetails/270bee8eb4a9f319cdb8 to your computer and use it in GitHub Desktop.
Download list
// change .flac for the extension
// for crossdomain
copy(Array.prototype.slice.call(document.body.querySelectorAll("a[href$='.flac']")).map(link => link.getAttribute('href')).join("\n"))
// for relative paths
copy(Array.prototype.slice.call(document.body.querySelectorAll("a[href$='.flac']")).map(link => link.getAttribute('href')).map(url => [window.location.protocol, '//', window.location.host, window.location.pathname, url].join('')).join("\n"))
// for absolute paths
copy(Array.prototype.slice.call(document.body.querySelectorAll("a[href$='.flac']")).map(link => link.getAttribute('href')).map(url => [window.location.protocol, '//', window.location.host, url].join('')).join("\n"))
# read a list.txt with list
wget -c -w 30 --random-wait -i list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment