logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 9c1da4a9f9fc17cffc2fa2261030c66d2a032a58
parent 5e1c39ac853bfe4da7feda2a48544cb5811873d9
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sat, 20 Jul 2019 23:08:26 +0700

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

Diffstat:

Myoutube_dl/extractor/generic.py2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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':