Skip to content

Instantly share code, notes, and snippets.

@seleb
Created December 4, 2019 07:53
Show Gist options
  • Save seleb/25b60d596d1f7c50f28a77f59de00532 to your computer and use it in GitHub Desktop.
Save seleb/25b60d596d1f7c50f28a77f59de00532 to your computer and use it in GitHub Desktop.
download tracks from https://soundcloud.com/you/tracks
function wait(t) {
return new Promise(resolve => setTimeout(resolve, t));
}
const tracks = Array.from(document.querySelectorAll(".trackManagerTrackList__item"));
for (track of tracks) {
const moreBtn = track.querySelector('.sc-button-more');
moreBtn.click();
await wait(500 + Math.random(500));
const downloadBtn = document.querySelector('.sc-button-download');
console.log(downloadBtn.download);
downloadBtn.click();
await wait(500 + Math.random(500));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment