How can I get the duration of Youtube video? I am trying with this...
import gdata.youtubeimport gdata.youtube.serviceyt_service = gdata.youtube.service.YouTubeService()entry = yt_service.GetYouTubeVideoEntry(video_id='the0KZLEacs')print 'Video title: %s' % entry.media.title.textprint 'Video duration: %s' % entry.media.duration.secondsConsole response
Traceback (most recent call last): File "/Users/LearningAnalytics/Dropbox/testing/youtube.py", line 8, in <module> entry = yt_service.GetYouTubeVideoEntry(video_id='the0KZLEacs') File "/Library/Python/2.7/site-packages/gdata/youtube/service.py", line 210, in GetYouTubeVideoEntry return self.Get(uri, converter=gdata.youtube.YouTubeVideoEntryFromString) File "/Library/Python/2.7/site-packages/gdata/service.py", line 1107, in Get'reason': server_response.reason, 'body': result_body}gdata.service.RequestError: {'status': 410, 'body': 'No longer available', 'reason': 'Gone'}