Skip to content

Instantly share code, notes, and snippets.

@nopium
Created April 9, 2020 16:28
Show Gist options
  • Save nopium/5c6c2afba2e3c3bc41776867ebb0fd3c to your computer and use it in GitHub Desktop.
Save nopium/5c6c2afba2e3c3bc41776867ebb0fd3c to your computer and use it in GitHub Desktop.
var els = document.getElementsByClassName("yt-simple-endpoint");
var links = {};
for (var e in els ) {
if( els[e].href && els[e].href.indexOf('watch')!=-1 ) {
var link = els[e].href.split('&list')[0];
links[link] = link;
}
}
for(var l in Object.keys(links)) {
console.log(l);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment