mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-01 09:02:57 +01:00
[youtube] Warn if URL is most likely wrong (#969)
This commit is contained in:
parent
48bfb5f238
commit
d7f44b5bdb
@ -402,6 +402,9 @@ def _extract_id(self, url):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user