Browse Source
[extractor/common] Make _is_valid_url more relaxed
master
Sergey M․
5 years ago
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with
4 additions and
6 deletions
-
youtube_dl/extractor/common.py
|
@ -1424,12 +1424,10 @@ class InfoExtractor(object): |
|
|
try: |
|
|
try: |
|
|
self._request_webpage(url, video_id, 'Checking %s URL' % item, headers=headers) |
|
|
self._request_webpage(url, video_id, 'Checking %s URL' % item, headers=headers) |
|
|
return True |
|
|
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): |
|
|
def http_scheme(self): |
|
|
""" Either "http:" or "https:", depending on the user's preferences """ |
|
|
""" Either "http:" or "https:", depending on the user's preferences """ |
|
|