]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[youtube] Recognize new locale-based player URLs (fixes #12885)
authorYen Chi Hsuan <yan12125@gmail.com>
Fri, 28 Apr 2017 07:47:26 +0000 (15:47 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Fri, 28 Apr 2017 07:48:30 +0000 (15:48 +0800)
ChangeLog
youtube_dl/extractor/youtube.py

index b23aa10d5314dc47cd47e61c37add526c21b9608..a31f99853214432bcf69e09c05a4a5e5aa0d0c6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+version <unreleased>
+
+Extractor
+* [youtube] Recognize new locale-based player URLs (#12885)
+
+
 version 2017.04.26
 
 Core
index 9e2b9115c1c15e1c8629fa1afd4f14d836eebcb9..b59f746af22fdfc67914bd70bca3f87665475c25 100644 (file)
@@ -963,7 +963,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
 
     def _extract_signature_function(self, video_id, player_url, example_sig):
         id_m = re.match(
-            r'.*?-(?P<id>[a-zA-Z0-9_-]+)(?:/watch_as3|/html5player(?:-new)?|/base)?\.(?P<ext>[a-z]+)$',
+            r'.*?-(?P<id>[a-zA-Z0-9_-]+)(?:/watch_as3|/html5player(?:-new)?|(?:/[a-z]{2}_[A-Z]{2})?/base)?\.(?P<ext>[a-z]+)$',
             player_url)
         if not id_m:
             raise ExtractorError('Cannot identify player %r' % player_url)