Created
September 17, 2022 13:50
-
-
Save amanikiruga/b9baf1404c8c126308aa8d6c582f2dd8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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