Jump to content
UBot Underground

Scraping Youtube


Recommended Posts

Hello,

 

I have seen ways to scrape google and other websites without using regular expression but with youtube it kind of seems difficult. Is regular expression the only way to scrape information from youtube such as find info about youtube rank, number of views, comments, scrape youtube titles etc

Is regular expression very time consuming and difficult to learn.

Link to post
Share on other sites

The API is the easiest way to scrape the data of a video.

 

Replace the [VIDEO_ID] with a video id.

http://gdata.youtube.com/feeds/api/videos/[VIDEO_ID]?v=2&alt=jsonc&callback=youtubeFeedCallback1&prettyprint=true

To scrape the data you can use this regex code.

(?<="likeCount": ").*?(?=")

More info on this regex snippet can be found here.

 

 

The comments can also be scraped using this url.

https://gdata.youtube.com/feeds/api/videos/[VIDEO_ID]/comments?max-results=50&start-index=1

Increase the value of the start index by 50 on each loop to scrape the next page of comments.

 

 

 

If you need a working example of the entire process PM me.

 

.

  • Like 1
Link to post
Share on other sites
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...