pythonyoutube-apisocial-media-like

parse youtube video likes dislikes using gadata API


I am using python and the gdata library to parse the info of a youtube video. My code is this:

yt_service = gdata.youtube.service.YouTubeService()
entry = yt_service.GetYouTubeVideoEntry(video_id='someid')

but in the entry.rating or entry.statistics there is no likes/dislikes

Where can I get that info from?


Solution

  • Once I use Python 3 and the gdata library doesn't have support for it I couldn't reproduce the results. But as far as I know, the entry.rating returns a xml code with the whole statistic content of the video. For a more specific result you should try entry.rating.average or entry.rating.num_raters