Skip to content

Instantly share code, notes, and snippets.

@AndrewStanton94
Last active April 9, 2020 18:12
Show Gist options
  • Save AndrewStanton94/7ffc3e88e5d531fb3916de194fbad565 to your computer and use it in GitHub Desktop.
Save AndrewStanton94/7ffc3e88e5d531fb3916de194fbad565 to your computer and use it in GitHub Desktop.
Exporting my Youtube Watch Later list. This gets the URL and the title if you're in the playlist.
[...document.querySelectorAll('.yt-simple-endpoint.style-scope.ytd-playlist-video-renderer')]
.map((elem) =>
`${elem.querySelector('#video-title').innerText} ${elem.href}`
.replace(/&list=WL.*/, ''))
.join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment