WRITELOOP

DELETE ALL VIDEOS FROM YOUTUBE'S WATCH LATER PLAYLIST (WATCHED AND UNWATCHED)

I use YouTube a lot for learning and content creation. The Watch Later playlist has a 5k videos limit, but if you are an avid user you can fill that in less than a year. I know there is a YouTube API, but I didn't want to take time with that. So, searching a little bit online I discovered how to solve that using your browser's javascript console. Here are the instructions on how to do that.

2022 September 15

IMPORTANT: This will delete ALL your videos on that playlist, so you can start fresh. Before moving on make sure that is exactly what you want.

  1. Since that operation will take 1 second for each item you want to delete, I recommend detaching a tab from you current browser session before moving on.

  2. Go to https://www.youtube.com/playlist?list=WL

  3. Activate the javascript console with and type the following javascript snippet:

# YouTube's english version:
setInterval(function() {
  document.querySelector('#contents button[aria-label="Action menu"]').click();
  var things = document.evaluate('//span[contains(text(),"Watch later")]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
    for (var i = 0; i < things.snapshotLength; i++) {
        things.snapshotItem(i).click();
    }
}, 1000);

# versão em português brasil do youtube
setInterval(function() {
  document.querySelector('#contents button[aria-label="Menu de ações"]').click();
  var things = document.evaluate('//span[contains(text(),"Assistir mais tarde")]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
    for (var i = 0; i < things.snapshotLength; i++) {
        things.snapshotItem(i).click();
    }
}, 1000);
  1. If you wish, move the browser window with the detached tab to another workspace/monitor etc, so you can move on with your other tasks until it finishes.
NOTE: The original content(s) that inspired this one can be found at:
https://m.youtube.com/watch?v=9Wo9nO_8CqE&t=67s
All copyright and intellectual property of each one belongs to its' original author.