From: Sergey M․ Date: Sat, 20 Jul 2019 16:08:26 +0000 (+0700) Subject: [extractor/generic] Restrict --default-search schemeless URLs detection pattern ... X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=9c1da4a9f9fc17cffc2fa2261030c66d2a032a58;p=youtube-dl [extractor/generic] Restrict --default-search schemeless URLs detection pattern (closes #21842) --- diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 77e217460..d34fc4b15 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -2226,7 +2226,7 @@ class GenericIE(InfoExtractor): default_search = 'fixup_error' if default_search in ('auto', 'auto_warning', 'fixup_error'): - if '/' in url: + if re.match(r'^[^\s/]+\.[^\s/]+/', url): self._downloader.report_warning('The url doesn\'t specify the protocol, trying with http') return self.url_result('http://' + url) elif default_search != 'fixup_error':