Last active
May 16, 2022 23:33
-
-
Save coleww/d7918fdfecd01551a9e3cb1432dad9e4 to your computer and use it in GitHub Desktop.
bandcamp download all purchases
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
// for use on https://bandcamp.com/download pages. | |
// once all the download links on the page are loaded, | |
// open the javascript console, paste the following code in, and hit enter. | |
// leave the page open until the downloads stop, | |
// it'll pause for 30 seconds after every click to ensure the last download has started already. | |
var secs = 30; // adjust as needed for slower connections. | |
var intervalTime = secs * 1000 | |
var toDownload = [].slice.call(document.querySelectorAll('.downloads a.item-button')); | |
var interval; | |
function downloadOne() { | |
var linkToClick = toDownload.pop(); | |
if (!linkToClick) { | |
clearInterval(interval); | |
} else { | |
linkToClick.click(); | |
} | |
} | |
downloadOne(); | |
interval = setInterval(downloadOne, intervalTime); |
Very nice indeed!
Brutal, you are a genius! With 500mbps symmetrical I can safely put secs
to 10
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!