I used to use the RSS feed to obtain videos from a user. I then used the "description" part of the feed, which contained a nicely HTML-formatted summary of a video. It shows a thumbnail with a link, time of video, username, star rating, etc.


http://gdata.youtube.com/feeds/base/users/KeepWatchingTheSkies/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile (Search for second tag)

Now I'm trying to use the YouTube API (through the gdata Python interface,) and I'm able to retrieve the video entries, but I can't figure out how to get this "description" that I used to get through the RSS feeds.

How can I do this?

  • I found a workaround, I'm not interested in an answer for this question anymore, thanks.
    – Ram Rachum
    Commented Nov 25, 2010 at 14:16
  • 7
    It would have been nice to have you post your work around instead of running off rudely Commented Feb 26, 2011 at 2:52

1 Answer 1

import gdata.youtube
import gdata.alt.appengine
import gdata.youtube.service

class Index(webapp.RequestHandler):
    def get(self):
        client = gdata.youtube.service.YouTubeService()
        feed = client.GetRecentlyFeaturedVideoFeed()

        for entry in feed.entry:
            self.response.out.write('<div>%s</div>' %entry.media.description)

If you are using a rendering template like Django, instead of self response call the rendering function of the template and pass the variable feed, in your html file call Django variables like this:

replace the self.response with:

templates.render(self, 'home.html',

and add to your html:

{% for entry in feed.entry %}
{% endfor %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.