summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2013-09-22 12:17:42 +0200
committerPhilipp Hagemeister <[email protected]>2013-09-22 12:17:42 +0200
commitbdde940e90320e350bd96df621ee7e32641e1eca (patch)
treed0b4c963bba6d2a913dcc86336f9772f077bdc86
parent45f4a76dbc268a56c212fe25cd27922541840cfe (diff)
downloadyoutube-dl-bdde940e90320e350bd96df621ee7e32641e1eca.tar.gz
youtube-dl-bdde940e90320e350bd96df621ee7e32641e1eca.zip
[youtube] Improve flash player URL handling
-rw-r--r--youtube_dl/extractor/youtube.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 56ad33fdc..888907c93 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1437,10 +1437,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
encrypted_sig = url_data['s'][0]
if self._downloader.params.get('verbose'):
if age_gate:
- player_version = self._search_regex(
- r'-(.+)\.swf$',
- player_url if player_url else None,
- 'flash player', fatal=False)
+ if player_url is None:
+ player_version = 'unknown'
+ else:
+ player_version = self._search_regex(
+ r'-(.+)\.swf$', player_url,
+ u'flash player', fatal=False)
player_desc = 'flash player %s' % player_version
else:
player_version = self._search_regex(