diff options
author | Sergey M․ <dstftw@gmail.com> | 2019-07-20 23:08:26 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2019-07-20 23:08:26 +0700 |
commit | 9c1da4a9f9fc17cffc2fa2261030c66d2a032a58 (patch) | |
tree | 4ed5034be94d35085f43f52d2c3b76e2739ccb29 | |
parent | 5e1c39ac853bfe4da7feda2a48544cb5811873d9 (diff) |
[extractor/generic] Restrict --default-search schemeless URLs detection pattern (closes #21842)
-rw-r--r-- | youtube_dl/extractor/generic.py | 2 |
1 files changed, 1 insertions, 1 deletions
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': |