Browse Source

[extractor/common] Use more generic URLError in _is_valid_url

Sergey M․ 10 năm trước cách đây
mục cha
commit
943a1e24b8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      youtube_dl/extractor/common.py

+ 1 - 1
youtube_dl/extractor/common.py

@@ -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