Skip to content

Instantly share code, notes, and snippets.

@nopium
Created April 9, 2020 16:28
Show Gist options
  • Select an option

  • Save nopium/5c6c2afba2e3c3bc41776867ebb0fd3c to your computer and use it in GitHub Desktop.

Select an option

Save nopium/5c6c2afba2e3c3bc41776867ebb0fd3c to your computer and use it in GitHub Desktop.

Revisions

  1. nopium created this gist Apr 9, 2020.
    11 changes: 11 additions & 0 deletions grab liked
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    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);
    }