Youtube Video Scraper

Abhishek Chaudhary
3 min readFeb 3, 2022

Scrape Youtube Video Scraper for video - title, views, likes , date, channel using keyword

*****************************************************************

Coding

The modules are well documented, it shows you how to collect the data, I want to improve it a little bit so that the data will be saved as CSV and you can use it for doing your research as a machine learning engineer. Here is the code that I created.

Without Coding

To make a bot which searches keyword on youtube.com and scrapes its result count, follow these steps:-

1. To create a new bot, click DK extension and type “youtube_video_scrape” and then click “ + New Api”.

2. Now open youtube.com in the browser before training the bot, and click “Record” to train the bot.

3. Then Reload the page to add the URL to the event. https://www.ebay.com/ ,

3.Now click the keyboard icon to add the input “profile_link” and output fields like profile_name, posts, followers, following, bio
then click on save and back to recording

4. To train the bot to click on search, then search a keyword, first type a keyword(eg: netlfix) in youtube search and press enter.

5. Now right click on the youtube screen, then click Datakund=>Start Repeat, to add loop for scraping similar items.

6.Then add a static wait for 3 to 5 to allow page to load by right click on Datakund=>Wait=>Static=>3.

7.Then click on first video to train the bot

8.Now click the keyboard icon to add the outputs such as title, views, likes , date, channel

9.Now stop the training(by clicking ), and click “run”.

10.then right click on video title and then Datakund=>Scrape=>Text=>product, to scrape the video title

Similarly we can scrape views, likes , date, channel.

11. Now stop the training(by back), and click “run”.

12.Enter the keyword for scrape ,then click “Run ”.

13. Now the outputs are scraped automatically

14.Results can be seen in extension as well as xlsx in downlods>datakund folder

--

--