0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-03 03:57:26 +00:00

[extractor/generic] Restrict --default-search schemeless URLs detection pattern (closes #21842)

This commit is contained in:
Sergey M․ 2019-07-20 23:08:26 +07:00
parent 5e1c39ac85
commit 9c1da4a9f9
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -2226,7 +2226,7 @@ def _real_extract(self, url):
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':