projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4113e6a
)
[youtube] only allow domain name to be upper-case (#1786)
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 18 Nov 2013 15:42:35 +0000
(16:42 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 18 Nov 2013 15:42:35 +0000
(16:42 +0100)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 9aa4c6fab6d05d08fa23a6ff5225dda7dbacc6c8..41838237c617f9758054cef6499ef97b17df5e93 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-139,10
+139,10
@@
class YoutubeBaseInfoExtractor(InfoExtractor):
class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
IE_DESC = u'YouTube.com'
- _VALID_URL = r"""(?x
i
)^
+ _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