A feature-rich command-line audio/video downloader
[youtube] Warn if URL is most likely wrong (#969)
Philipp Hagemeisterd7f44b5bdba7
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.pyindex 025afb3904..109c8a93fa 100644--- a/youtube_dl/extractor/youtube.py+++ b/youtube_dl/extractor/youtube.py@@ -402,6 +402,9 @@ class YoutubeIE(InfoExtractor):return video_iddef _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 parametermobj = re.search(self._NEXT_URL_RE, url)if mobj: