mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-18 05:27:47 +01:00
[extractor/generic] Restrict --default-search schemeless URLs detection pattern (closes #21842)
This commit is contained in:
parent
5e1c39ac85
commit
9c1da4a9f9
@ -2226,7 +2226,7 @@ class GenericIE(InfoExtractor):
|
|||||||
default_search = 'fixup_error'
|
default_search = 'fixup_error'
|
||||||
|
|
||||||
if default_search in ('auto', 'auto_warning', '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')
|
self._downloader.report_warning('The url doesn\'t specify the protocol, trying with http')
|
||||||
return self.url_result('http://' + url)
|
return self.url_result('http://' + url)
|
||||||
elif default_search != 'fixup_error':
|
elif default_search != 'fixup_error':
|
||||||
|
Loading…
Reference in New Issue
Block a user