Skip to content

Commit

Permalink
[extractor/common] Make _is_valid_url more relaxed
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw authored and pareronia committed Jun 22, 2020
1 parent 15ad7b0 commit 7f4bc62
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions youtube_dl/extractor/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,12 +1424,10 @@ def _is_valid_url(self, url, video_id, item='video', headers={}):
try:
self._request_webpage(url, video_id, 'Checking %s URL' % item, headers=headers)
return True
except ExtractorError as e:
if isinstance(e.cause, compat_urllib_error.URLError):
self.to_screen(
'%s: %s URL is invalid, skipping' % (video_id, item))
return False
raise
except ExtractorError:
self.to_screen(
'%s: %s URL is invalid, skipping' % (video_id, item))
return False

def http_scheme(self):
""" Either "http:" or "https:", depending on the user's preferences """
Expand Down

0 comments on commit 7f4bc62

Please sign in to comment.