]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/common] Use more generic URLError in _is_valid_url
authorSergey M․ <dstftw@gmail.com>
Sat, 24 Oct 2015 10:25:04 +0000 (16:25 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 24 Oct 2015 10:25:04 +0000 (16:25 +0600)
youtube_dl/extractor/common.py

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