Skip to content

Instantly share code, notes, and snippets.

@u-l-y
Last active April 2, 2020 15:06
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 u-l-y/65d9f536008577cc20f0e33dd5aa1c4d to your computer and use it in GitHub Desktop.
Save u-l-y/65d9f536008577cc20f0e33dd5aa1c4d to your computer and use it in GitHub Desktop.
Extract Youtube IDs from a Playlist (in console)
const videos = [
...document.querySelectorAll(
'.yt-simple-endpoint.ytd-playlist-video-renderer'
)
].map(
v =>
v
.getAttribute('href')
.split('=')[1]
.split('&')[0]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment