diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-07-23 02:19:33 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-07-23 02:19:33 +0200 |
commit | c081b35c27b8e2f1735c62933709448c1a675f72 (patch) | |
tree | 77e424a29528f0ff7e36aba906f13a57aa7cc722 /youtube_dl/extractor | |
parent | 9f43890bcd6bf6c0bf75e0ec748d29dc9b01dab5 (diff) |
[youtube] Support new player URLs (Fixes #3326)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 072e711c2..a346f4c96 100644 --- 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') |