From e31fed95b4b3026c34cec85c38c89b9b5c98b3d6 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Fri, 28 Apr 2017 15:47:26 +0800 Subject: [PATCH] [youtube] Recognize new locale-based player URLs (fixes #12885) --- ChangeLog | 6 ++++++ youtube_dl/extractor/youtube.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b23aa10d5..a31f99853 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +version + +Extractor +* [youtube] Recognize new locale-based player URLs (#12885) + + version 2017.04.26 Core diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 9e2b9115c..b59f746af 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -963,7 +963,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): def _extract_signature_function(self, video_id, player_url, example_sig): id_m = re.match( - r'.*?-(?P[a-zA-Z0-9_-]+)(?:/watch_as3|/html5player(?:-new)?|/base)?\.(?P[a-z]+)$', + r'.*?-(?P[a-zA-Z0-9_-]+)(?:/watch_as3|/html5player(?:-new)?|(?:/[a-z]{2}_[A-Z]{2})?/base)?\.(?P[a-z]+)$', player_url) if not id_m: raise ExtractorError('Cannot identify player %r' % player_url) -- 2.22.2