Date Tags Python

Google has been providing a GData API to Youtube since a few months now, this is quite cool because it allows applications like Totem to access videos stored at Youtube.

So I wrote a little Python wrapper using python-gdata to ease access to that nice API, especially video thumbnails and direct FLV urls. It’s called YoutubeClient, here’s a little example:

cli = YouTubeClient()

for video in cli.recently_featured():
  thumb_url = cli.get_largest_thumbnail(video)
  flv_url = cli.get_flv_video_url(video.link[1].href)
  print video.title.text, thumb_url, flv_url

Right now, what you can do is:

  • access standard feeds: recently_featured, most_viewed, top_rated
  • browse Youtube tags
  • access user-centric data: uploaded_videos, contacts, favorite_videos

This is really fun to use and would make a nice Elisa plugin… Any volunteer? :)

Next episode, accessing your Picasaweb data


Comments

comments powered by Disqus