Skip to content Skip to sidebar Skip to footer

Scraping Elements From A Youtube Video

I want to take some tags from youtube videos like the title, the number of views etc.I use BeautifulSoup for that but I want to make it faster.Here is my code: #for the title from

Solution 1:

Use google's youtube api.

Part of their example:

defPrintEntryDetails(entry):
   print'Video title: %s' % entry.media.title.text
   print'Video published on: %s ' % entry.published.text
   print'Video description: %s' % entry.media.description.text
   print'Video category: %s' % entry.media.category[0].text
   print'Video tags: %s' % entry.media.keywords.text
   print'Video watch page: %s' % entry.media.player.url
   print'Video flash player URL: %s' % entry.GetSwfUrl()
   print'Video duration: %s' % entry.media.duration.seconds

Post a Comment for "Scraping Elements From A Youtube Video"