2007 / python-youtube: A simple YouTube API Client for Python

A simple YouTube API Client for Python

This is python-youtube, a client for the YouTube API written in Python. You can use it to access YouTube metadata in your applications and webapps. This implementation allows you to access the REST interface of the YouTube API.

Update 2009-09-10: I received reports via e-mail that this code stopped working recently. As I don't personally use this code anymore in projects and therefore the code is basically orphaned, I suggest you either send patches or use the "official" Python API for YouTube, which is called "gdata-python-client": gdata-python-client on Google Code

Thanks for your understanding and good luck with your projects :)

Freshmeat.net project page

Documentation

Download

  • Current version: youtube.py (Updated: 2008-01-23)

ChangeLog

  • 2007-06-05: Initial release
  • 2007-07-09: Paging added (patch from Davide Muzzarelli)
  • 2008-01-23: Reformat code to be pylint clean and PEP-8 conformant, fix small bugs

Example usage

c = youtube.YouTubeClient( 'your-dev-id')

for video in c.list_by_user( 'your-username'):
    v = c.get_details( video['id'])
    print video['id']
    print v['thumbnail_url']
    print v['title']
    print v['description']

Mon Jul 9 15:24:25 2007 +0000