https?://videoplayer\.vevo\.com/embed/embedded\?videoId=|
vevo:)
(?P<id>[^&?#]+)'''
+
_TESTS = [{
'url': 'http://www.vevo.com/watch/hurts/somebody-to-die-for/GB1101300280',
"md5": "06bea460acb744eab74a9d7dcb4bfd61",
"duration": 230.12,
"width": 1920,
"height": 1080,
- 'timestamp': 1372057200,
+ # timestamp and upload_date are often incorrect; seem to change randomly
+ 'timestamp': int,
}
}, {
'note': 'v3 SMIL format',
'title': 'I Wish I Could Break Your Heart',
'duration': 226.101,
'age_limit': 0,
- 'timestamp': 1392796919,
+ 'timestamp': int,
}
}, {
'note': 'Age-limited video',
'age_limit': 18,
'title': 'Tunnel Vision (Explicit)',
'uploader': 'Justin Timberlake',
- # timestamp and upload_date are often incorrect; seem to change randomly
'upload_date': 're:2013070[34]',
'timestamp': int,
},
video_id = mobj.group('id')
json_url = 'http://videoplayer.vevo.com/VideoService/AuthenticateVideo?isrc=%s' % video_id
- video_info = self._download_json(json_url, video_id)['video']
+ response = self._download_json(json_url, video_id)
+ video_info = response['video']
+
+ if not video_info:
+ if 'statusMessage' in response:
+ raise ExtractorError('%s said: %s' % (self.IE_NAME, response['statusMessage']), expected=True)
+ raise ExtractorError('Unable to extract videos')
formats = self._formats_from_json(video_info)