]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/zattoo.py
[ie/motherless] Support uploader playlists (#8994)
[yt-dlp.git] / yt_dlp / extractor / zattoo.py
index 1e38812aad674a66613edc038f791a1c0fcdb3a5..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)
@@ -202,7 +203,6 @@ def _extract_formats(self, cid, video_id, record_id=None, ondemand_id=None, onde
                 for this_format in this_formats:
                     this_format['quality'] = preference
                 formats.extend(this_formats)
-        self._sort_formats(formats)
         return formats, subtitles
 
     def _extract_video(self, video_id, record_id=None):
@@ -320,7 +320,7 @@ class ZattooRecordingsIE(ZattooBaseIE):
 
 
 class NetPlusTVBaseIE(ZattooPlatformBaseIE):
-    _NETRC = 'netplus'
+    _NETRC_MACHINE = 'netplus'
     _HOST = 'netplus.tv'
     _API_HOST = 'www.%s' % _HOST