I modified this guy's code to make it work better. Google doesn't render the whole page so only a limited number of songs get added. Instructions (also mostly taken from that guy's post):
-
Open google chrome -- this will NOT work with Firefox.
-
Go to https://spotlistr.herokuapp.com/#/search/textbox and log in with Spotify.
-
Open your Google Play Music playlist in another tab, and stay in that tab.
-
Open the developer console (click here for a tutorial).
-
Paste the following code into the console, and press enter. (If the console asks you to "allow pasting", follow the prompts)
function fReplace(thisString, thisThing, thatThing) {
let tLS = thisString;
while (tLS.includes(thisThing)) {
tLS = tLS.replace(thisThing, thatThing);
}
return (tLS);
}
function grabAllSongs() {
var playlist = document.querySelectorAll('.song-table tr.song-row');
var uniquesFound = 0;
for (var i = 0; i < playlist.length; i++) {
var l = playlist[i];
l.querySelectorAll('td[data-col="title"]')[0].textContent;
var title = l.querySelectorAll('td[data-col="title"]')[0].textContent;
title = encodeURI(title);
title = fReplace(title, "%20%20", "%20");
title = fReplace(title, "Buy%0A%20", "");
title = fReplace(title, "%0A%20", "");
title = fReplace(title, "%0A", "");
title = decodeURI(title);
var artist = l.querySelectorAll('td[data-col="artist"]')[0].textContent;
var album = l.querySelectorAll('td[data-col="album"]')[0].textContent;
var row = artist + ' | ' + title + ' | ' + album;
if (allSongs.indexOf(row) === -1) {
allSongs.push(row);
uniquesFound++;
}
}
if (uniquesFound > 0) {
l.scrollIntoView(true);
window.setTimeout(function () {
grabAllSongs();
}, 1000);
} else {
finalStr = allSongs.join("\r\n");
console.log(finalStr);
}
}
var finalStr;
var topOfPage = document.querySelector('.header-container');
topOfPage.scrollIntoView(true);
var allSongs = [];
window.setTimeout(function () {
grabAllSongs();
}, 2000);
-
Wait a bit and a list of songs, artists, and albums will be generated in the console. Note that this will NOT copy any duplicate songs.
-
Copy the list of songs, artists and albums
-
Paste the list into the textbox at https://spotlistr.herokuapp.com/#/search/textbox
-
Press the "Search!" button, and your songs will be loaded up.
-
Scroll down, choose the songs with multiple matches which you prefer
-
At the bottom of the page, give your playlist a name, and press the "Create {playlist name}" button.
-
All done! Whew.