]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[youtube] only allow domain name to be upper-case (#1786)
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 18 Nov 2013 15:42:35 +0000 (16:42 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 18 Nov 2013 15:42:35 +0000 (16:42 +0100)
youtube_dl/extractor/youtube.py

index 9aa4c6fab6d05d08fa23a6ff5225dda7dbacc6c8..41838237c617f9758054cef6499ef97b17df5e93 100644 (file)
@@ -139,10 +139,10 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
 
 class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
     IE_DESC = u'YouTube.com'
-    _VALID_URL = r"""(?xi)^
+    _VALID_URL = r"""(?x)^
                      (
                          (?:https?://|//)?                                    # http(s):// or protocol-independent URL (optional)
-                         (?:(?:(?:(?:\w+\.)?youtube(?:-nocookie)?\.com/|
+                         (?:(?:(?:(?:\w+\.)?[yY][oO][uU][tT][uU][bB][eE](?:-nocookie)?\.com/|
                             tube\.majestyc\.net/|
                             youtube\.googleapis\.com/)                        # the various hostnames, with wildcard subdomains
                          (?:.*?\#/)?                                          # handle anchor (#/) redirect urls