[youtube] Improve flash player URL handling

This commit is contained in:
Philipp Hagemeister 2013-09-22 12:17:42 +02:00
parent 45f4a76dbc
commit bdde940e90

View file

@ -1437,10 +1437,12 @@ def _real_extract(self, url):
encrypted_sig = url_data['s'][0] encrypted_sig = url_data['s'][0]
if self._downloader.params.get('verbose'): if self._downloader.params.get('verbose'):
if age_gate: if age_gate:
player_version = self._search_regex( if player_url is None:
r'-(.+)\.swf$', player_version = 'unknown'
player_url if player_url else None, else:
'flash player', fatal=False) player_version = self._search_regex(
r'-(.+)\.swf$', player_url,
u'flash player', fatal=False)
player_desc = 'flash player %s' % player_version player_desc = 'flash player %s' % player_version
else: else:
player_version = self._search_regex( player_version = self._search_regex(