Skip to content

Instantly share code, notes, and snippets.

@seven332
Created July 12, 2016 16:00
Show Gist options
  • Select an option

  • Save seven332/1b74b56dfd30bc6bc50ccb37f1533df5 to your computer and use it in GitHub Desktop.

Select an option

Save seven332/1b74b56dfd30bc6bc50ccb37f1533df5 to your computer and use it in GitHub Desktop.
var all_dom = document.getElementsByClassName("yt-uix-sessionlink yt-uix-tile-link spf-link yt-ui-ellipsis yt-ui-ellipsis-2");
var all_id = [];
for (i = 0; i < all_dom.length; i++) {
var str = all_dom[i].getAttribute("href");
str = str.substring(9, str.length);
all_id.push(str);
}
console.log("http://www.youtube.com/watch_videos?video_ids=" + all_id.join(","));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment