From c081b35c27b8e2f1735c62933709448c1a675f72 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 23 Jul 2014 02:19:33 +0200 Subject: [PATCH] [youtube] Support new player URLs (Fixes #3326) --- youtube_dl/extractor/youtube.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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[a-zA-Z0-9_-]+)(?:/watch_as3)?\.(?P[a-z]+)$', + r'.*-(?P[a-zA-Z0-9_-]+)(?:/watch_as3|/html5player)?\.(?P[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') -- 2.22.2