Created
May 7, 2017 06:38
-
-
Save teknikqa/f14fa07cf28228cb2dfe49a0caab8e70 to your computer and use it in GitHub Desktop.
Bulk delete Last.FM scrobbles & loved tracks
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
// On the Last.FM website go to the page which lists the tracks that you have loved. | |
// Open Chrome DevTools (or Firefox or any modern browser that has a built in Javacript Console) | |
// and run the following command. | |
// This basically clicks on all the delete buttons on the page and reloads the page. | |
jQuery('.love-button--loved').each(function(_, b) { | |
b.click(); | |
}); | |
location.reload(); |
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
// On the Last.FM website go to the page which lists the tracks that you have scrobbled. | |
// Open Chrome DevTools (or Firefox or any modern browser that has a built in Javacript Console) | |
// and run the following command. | |
// This basically clicks on all the delete buttons on the page and reloads the page. | |
jQuery('.dropdown-menu-clickable-item').each(function(_, b) { | |
b.click(); | |
}); | |
location.reload(); |
Thx for this ! :)
YES! Thanks. I feel asleep with spotify on and things got a little crazy
Thank you.
If you need something more heavyweight (say to delete many 1000s of scrobbles) try this https://github.com/chrs-myrs/lastfm-scrobble-purger
thank you so much i love you
thanks
@dfbadawi 's worked perfectly.
is it still working?
is it still working?
Yes it does! Just used it.
it didnt work out for me
it didnt work out for me
Last.fm changed their site. To remove loved tracks use:
jQuery('.chartlist-love-button').each(function(_, b) {
b.click();
});
location.reload();
Confirming that @dfbadawi's method worked as of 2021-12-01.
Looks like the JS to use for deleting is now:
jQuery('.more-item--delete').each(function(_, b) {
b.click()
});
location.reload()
Right now, the server has a limit on the number of requests in a certain period of time. So we have to add a delay between the removal of likes.
(async () => {
const DELAY = 5_000;
const likes = $$('.chartlist-love-button');
for (const like of Array.from(likes)) {
like.click();
await new Promise((resolve) => setTimeout(resolve, DELAY));
}
location.reload();
})();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to avoid clicking all dropdown items: