projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45f4a76
)
[youtube] Improve flash player URL handling
author
Philipp Hagemeister
<phihag@phihag.de>
Sun, 22 Sep 2013 10:17:42 +0000
(12:17 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sun, 22 Sep 2013 10:17:42 +0000
(12:17 +0200)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 56ad33fdc11465d3e2e3fed025966086aec9a927..888907c93fe0936da65a82495007c8e08698a5d7 100644
(file)
--- 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(