projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f43890
)
[youtube] Support new player URLs (Fixes #3326)
author
Philipp Hagemeister
<phihag@phihag.de>
Wed, 23 Jul 2014 00:19:33 +0000
(
02:19
+0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Wed, 23 Jul 2014 00:19:33 +0000
(
02:19
+0200)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 072e711c2e0105c3a69908cff70bf3758542587d..a346f4c960df87b4f35bda4f8e571c6405f1a316 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-346,8
+346,10
@@
class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
def _extract_signature_function(self, video_id, player_url, slen):
id_m = re.match(
- r'.*-(?P<id>[a-zA-Z0-9_-]+)(?:/watch_as3)?\.(?P<ext>[a-z]+)$',
+ r'.*-(?P<id>[a-zA-Z0-9_-]+)(?:/watch_as3
|/html5player
)?\.(?P<ext>[a-z]+)$',
player_url)
+ if not id_m:
+ raise ExtractorError('Cannot identify player %r' % player_url)
player_type = id_m.group('ext')
player_id = id_m.group('id')