Skip to content

Instantly share code, notes, and snippets.

@coleww
Last active May 16, 2022 23:33
Show Gist options
  • Save coleww/d7918fdfecd01551a9e3cb1432dad9e4 to your computer and use it in GitHub Desktop.
Save coleww/d7918fdfecd01551a9e3cb1432dad9e4 to your computer and use it in GitHub Desktop.
bandcamp download all purchases
// 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);
@StickySli
Copy link

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