1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-05-17 10:39:33 +00:00

[youtube] only allow domain name to be upper-case (#1786)

This commit is contained in:
Philipp Hagemeister 2013-11-18 16:42:35 +01:00
parent 4113e6ab56
commit cb7dfeeac4

View 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