Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
download mp3's from bandcamp
var commands = [];
commands.push('mkdir "' + TralbumData.current.title + '"');
commands.push('cd "' + TralbumData.current.title + '"');
TralbumData.trackinfo.forEach(function (track, index) {
if (track.file) {
var href = track.file['mp3-128'];
if (href.startsWith("//")) {
href = "https:" + href
}
commands.push('curl -o "' + track.title + '.mp3" -L "' + href + '"&');
}
});
commands.push('cd ../');
console.log(commands.join('\n'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.