Skip to content

Instantly share code, notes, and snippets.

@arnoudhgz
Last active May 11, 2026 23:02
Show Gist options
  • Select an option

  • Save arnoudhgz/3884f65cee7acb66f43e2b6ba7cec3b2 to your computer and use it in GitHub Desktop.

Select an option

Save arnoudhgz/3884f65cee7acb66f43e2b6ba7cec3b2 to your computer and use it in GitHub Desktop.
Youtube premium add songs from playlist to your liked songs

Open your playlist in your browser, scroll all the way to the bottom (Youtube music does not show all at once), open your developer tools, run this in the console:

(async () => {
  const buttons = document.querySelectorAll('button.ytSpecButtonShapeNextHost[aria-pressed="false"][aria-label="Like"]');
  console.log(`Found ${buttons.length} Like buttons to click`);
  for (const btn of buttons) {
    btn.click();
    await new Promise(r => setTimeout(r, 500));
  }
  console.log('Done');
})();

It will add all the songs in the list to your liked songs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment