A feature-rich command-line audio/video downloader
[extractor/generic] Restrict --default-search schemeless URLs detection pattern (closes #21842)
Sergey M․9c1da4a9f9fc
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.pyindex 77e2174609..d34fc4b15c 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':