Created
January 15, 2019 22:34
-
-
Save moqmar/2be1d8294d94d0a474217fc02e69e0d6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// 1. Go to https://open.spotify.com/collection/tracks | |
// 2. Scroll to the very bottom so everything is loaded | |
// 3. Press F12 and paste the following code (obviously only if you understand what it does) | |
// 4. Press Ctrl+A and copy everything to a .csv file | |
document.documentElement.innerHTML = "<pre>Title\tArtist\tAlbum\n" | |
+ [...document.querySelectorAll(".tracklist .tracklist-row")] | |
.map(x => { | |
const e = x.querySelector(".TrackListRow__explicit-label"); | |
if (e) e.parentElement.removeChild(e); | |
return x.querySelector(".tracklist-name").textContent + "\t" + | |
x.querySelector(".second-line").textContent.replace(/•/, "\t") | |
}) | |
.join("\n") | |
+ "</pre>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment