cob007 19 Posted December 18, 2014 Report Share Posted December 18, 2014 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 etcIs regular expression very time consuming and difficult to learn. Quote Link to post Share on other sites
Gogetta 263 Posted December 18, 2014 Report Share Posted December 18, 2014 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=trueTo 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. . 1 Quote Link to post Share on other sites
cob007 19 Posted December 23, 2014 Author Report Share Posted December 23, 2014 Hi,Thanks a lot for your reply, have sent you a PM!! Quote Link to post Share on other sites
cob007 19 Posted February 20, 2016 Author Report Share Posted February 20, 2016 The youtube API doesnt work anymore; (http://gdata.youtube.com/feeds/api/videos/). What is the alternative? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.