Skip to content

Commit

Permalink
[extractor/generic] Restrict --default-search schemeless URLs detecti…
Browse files Browse the repository at this point in the history
…on pattern (closes #21842)
  • Loading branch information
dstftw authored and Malekkhatab committed Jul 24, 2019
1 parent 8a4e448 commit 3ae38f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/extractor/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 3ae38f7

Please sign in to comment.