aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-07-01 02:29:29 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-07-01 02:29:29 +0200
commitd7f44b5bdba7e4e23401c8ccdf0c238e24c6697d (patch)
tree8187f5acd890e611d556705e2fbb5e30eccf269e /youtube_dl/extractor/youtube.py
parent48bfb5f2387ab47e1973d9db0782a9af66ffc4e6 (diff)
[youtube] Warn if URL is most likely wrong (#969)
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 025afb390..109c8a93f 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -402,6 +402,9 @@ class YoutubeIE(InfoExtractor):
return video_id
def _real_extract(self, url):
+ if re.match(r'(?:https?://)?[^/]+/watch\?feature=[a-z_]+$', url):
+ self._downloader.report_warning(u'Did you forget to quote the URL? Remember that & is a meta-character in most shells, so you want to put the URL in quotes, like youtube-dl \'http://www.youtube.com/watch?feature=foo&v=BaW_jenozKc\' (or simply youtube-dl BaW_jenozKc ).')
+
# Extract original video URL from URL with redirection, like age verification, using next_url parameter
mobj = re.search(self._NEXT_URL_RE, url)
if mobj: