]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/zattoo.py
[ie/dailymotion] Support search (#8292)
[yt-dlp.git] / yt_dlp / extractor / zattoo.py
index 22620c0a324d94c37816f134bf1a3209abcd3ca5..6bd9ea064e9babaa6f312f46c9a45fcd81f5c889 100644 (file)
@@ -2,7 +2,8 @@
 from uuid import uuid4
 
 from .common import InfoExtractor
-from ..compat import compat_HTTPError, compat_str
+from ..compat import compat_str
+from ..networking.exceptions import HTTPError
 from ..utils import (
     ExtractorError,
     int_or_none,
@@ -36,7 +37,7 @@ def _perform_login(self, username, password):
                     'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
                 })
         except ExtractorError as e:
-            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 400:
+            if isinstance(e.cause, HTTPError) and e.cause.status == 400:
                 raise ExtractorError(
                     'Unable to login: incorrect username and/or password',
                     expected=True)