1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 21:52:54 +00:00

[extractor/common] Use more generic URLError in _is_valid_url

This commit is contained in:
Sergey M․ 2015-10-24 16:25:04 +06:00
parent 50f01302d3
commit 943a1e24b8

View file

@ -842,7 +842,7 @@ class InfoExtractor(object):
self._request_webpage(url, video_id, 'Checking %s URL' % item) self._request_webpage(url, video_id, 'Checking %s URL' % item)
return True return True
except ExtractorError as e: except ExtractorError as e:
if isinstance(e.cause, compat_HTTPError): if isinstance(e.cause, compat_urllib_error.URLError):
self.to_screen( self.to_screen(
'%s: %s URL is invalid, skipping' % (video_id, item)) '%s: %s URL is invalid, skipping' % (video_id, item))
return False return False