Skip to content

Instantly share code, notes, and snippets.

@amanikiruga
Created September 17, 2022 13:50
Show Gist options
  • Save amanikiruga/b9baf1404c8c126308aa8d6c582f2dd8 to your computer and use it in GitHub Desktop.
Save amanikiruga/b9baf1404c8c126308aa8d6c582f2dd8 to your computer and use it in GitHub Desktop.
/*
Step 1: Open the youtube channel, go to the videos tab
Step 2: Right click on this page & select Inspect element
Step 3: Click on console tab, scroll down below,
Step 4. Paste the first code snippet to the console and hit enter
Step 5. Let the page loaded all the way down to the last video. Then again Copy and Paste the next code snippet to the console and hit enter
You now should have all the video titles and links
*/
//first
var scroll = setInterval(function(){ window.scrollBy(0, 1000)}, 1000);
//second
window.clearInterval(scroll); console.clear(); urls = $$('a'); urls.forEach(function(v,i,a){if (v.id=="video-title"){console.log('\t'+v.title+'\t'+v.href+'\t')}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment