[youtube] don't crash in verbose mode if 'ad3_module' is not defined in age protected videos (fixes #1159)
This commit is contained in:
parent
fd5539eb41
commit
ed27d35674
|
@ -718,8 +718,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
s = url_data['s'][0]
|
s = url_data['s'][0]
|
||||||
if age_gate:
|
if age_gate:
|
||||||
player_version = self._search_regex(r'ad3-(.+?)\.swf',
|
player_version = self._search_regex(r'ad3-(.+?)\.swf',
|
||||||
video_info['ad3_module'][0], 'flash player',
|
video_info['ad3_module'][0] if 'ad3_module' in video_info else 'NOT FOUND',
|
||||||
fatal=False)
|
'flash player', fatal=False)
|
||||||
player = 'flash player %s' % player_version
|
player = 'flash player %s' % player_version
|
||||||
else:
|
else:
|
||||||
player = u'html5 player %s' % self._search_regex(r'html5player-(.+?)\.js', video_webpage,
|
player = u'html5 player %s' % self._search_regex(r'html5player-(.+?)\.js', video_webpage,
|
||||||
|
|
Loading…
Reference in New Issue