Skip to content

Instantly share code, notes, and snippets.

@Axfan
Created June 11, 2015 18:31
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 Axfan/f861328e6050daadc757 to your computer and use it in GitHub Desktop.
Save Axfan/f861328e6050daadc757 to your computer and use it in GitHub Desktop.
Get a youtube playlist in comma delimetered format
var videos = document.getElementsByClassName("pl-video");
var videoIDs = [];
for ( v = 0; v < videos.length; v++ ) {
videoIDs.push( videos[v].getAttribute("data-video-id") );
}
window.alert(videoIDs.toString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment