Created
November 2, 2016 21:12
-
-
Save liamg/873485f03ca915decb914c6e6607cd69 to your computer and use it in GitHub Desktop.
Google Music Playlist Exporter
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
var i, playlistString = '', playlist = document.querySelectorAll('tr.song-row'); | |
for (i = 0, i < playlist.length; i++) { | |
var track = playlist[i]; | |
var title = track.querySelector('td[data-col=title] span').textContent; | |
var artist = track.querySelector('td[data-col=artist] span').textContent; | |
playlistString += ('"' + artist + '", "' + title + '"\n'); | |
} | |
console.log(playlistString); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment