Retrieving a YouTube video author using Python and YouTubeAPI

how to get author / username from an object using:

GetYouTubeVideoEntry(video_id=youtube_video_id_to_output)

I am using google gdata.youtube.service Python library

Thanks in advance!:)

+5
source share
2 answers

Since the YouTube API is based on GData, which is based on Atom, the 'author' object is an array with name objects that can contain names, URLs, etc.

Is this what you want:

>>> client = gdata.youtube.service.YouTubeService()
>>> video = client.GetYouTubeVideoEntry(video_id='CoYBkXD0QeU')
>>> video.author[0].name.text
'GoogleDevelopers'
+6
source

Have you tried something like this?

foo = GetYouTubeVideoEntry(video_id=youtube_video_id_to_output)
foo.author

docs for YouTubeVideoEntry are small, but the method __init__seems to accept the author.

0
source

All Articles