Skip to content

Instantly share code, notes, and snippets.

@ktaragorn
Last active August 30, 2017 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ktaragorn/a0ff7153a8eab6521fa49ac8276c9083 to your computer and use it in GitHub Desktop.
Save ktaragorn/a0ff7153a8eab6521fa49ac8276c9083 to your computer and use it in GitHub Desktop.
Get all video urls in your youtube playlist (watch later list in this case). Run this in browser inspect on that page.
JSON.stringify(Array.prototype.slice.call(document.querySelectorAll(".pl-video-title-link")).map(function(a){return a.href.replace(/&list=.*/g,'').replace(/&index=.*/g,'')}))
@ktaragorn
Copy link
Author

Removes the useless url params and exports as json string

@ktaragorn
Copy link
Author

Trick to empty WL list - add to a different playlist and remove from WL
https://www.reddit.com/r/youtube/comments/2jfdzf/how_to_remove_all_videos_from_watch_later/

@ktaragorn
Copy link
Author

Remember to extend the list first to show all videos, else only the first 100 will be grabbed

@ktaragorn
Copy link
Author

This step is redundant, it is easier to download the public playlist created to clear WL itself since youtube-dl can handle playlists

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