Last active
January 24, 2022 10:55
-
-
Save kowalcj0/a13c6b05e2c158dbb0cbdeb3c4daf33b to your computer and use it in GitHub Desktop.
Generate torrent links for all items listed on a collection page
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
var raw_links = document.querySelectorAll(".results .item-ttl a") | |
var torrent_links = []; | |
for (var i = 0; i < raw_links.length; i++) { | |
var release_name = raw_links[i].attributes.href.value.split('/')[2]; | |
torrent_links.push("https://archive.org/download/" + release_name + "/" + release_name + "_archive.torrent"); | |
}; | |
console.log(torrent_links.join('\r\n')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script extracts and converts all relative release HREFs e.g
details/M.nomized-CoveringThePast2010-2015
to absolute URL https://archive.org/download/M.nomized-CoveringThePast2010-2015/M.nomized-CoveringThePast2010-2015_archive.torrent