youtube video length timingRecently I’ve received a request on how to sum the total hours of a Youtube videos in a search result. I’ve made the simple JS iterator that fetches hours/min/sec from browser html info and sums them up.
See the code below:

You may try the console scraper on the search results for “north pole fauna“. Open the Youtube search results, open web developer tools (F12, Ctrl+Shift+I in Opera), and insert the code by the way similar to described in this post.

Large search results amount – Proxying needed

Since Youtube does not tolerate frequent requests from a single IP, there is a need to add proxies- if scraping many search pages (over 30). If no proxy are used, Youtube will change the page layout after about 33 loops. It removes the Next button and limits the number of results on a page.

This scraper is good to extract play length of up to 600 search results. There is room for improvement. Your question and suggestions are welcomed.