]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/canvas.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / canvas.py
index 82fded4e1141eed42243beece58c2b25ad38e378..ae6e03a4d5cf4bcdb44efc5327a86c397da69ae5 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import unicode_literals
 import json
 
 
@@ -119,7 +118,6 @@ def _real_extract(self, url):
                     'format_id': format_type,
                     'url': format_url,
                 })
-        self._sort_formats(formats)
 
         subtitle_urls = data.get('subtitleUrls')
         if isinstance(subtitle_urls, list):
@@ -245,10 +243,6 @@ class VrtNUIE(GigyaBaseIE):
             'upload_date': '20200727',
         },
         'skip': 'This video is only available for registered users',
-        'params': {
-            'username': '<snip>',
-            'password': '<snip>',
-        },
         'expected_warnings': ['is not a supported codec'],
     }, {
         # Only available via new API endpoint
@@ -264,24 +258,13 @@ class VrtNUIE(GigyaBaseIE):
             'episode_number': 5,
         },
         'skip': 'This video is only available for registered users',
-        'params': {
-            'username': '<snip>',
-            'password': '<snip>',
-        },
         'expected_warnings': ['Unable to download asset JSON', 'is not a supported codec', 'Unknown MIME type'],
     }]
     _NETRC_MACHINE = 'vrtnu'
     _APIKEY = '3_0Z2HujMtiWq_pkAjgnS2Md2E11a1AwZjYiBETtwNE-EoEHDINgtnvcAOpNgmrVGy'
     _CONTEXT_ID = 'R3595707040'
 
-    def _real_initialize(self):
-        self._login()
-
-    def _login(self):
-        username, password = self._get_login_info()
-        if username is None:
-            return
-
+    def _perform_login(self, username, password):
         auth_info = self._gigya_login({
             'APIKey': self._APIKEY,
             'targetEnv': 'jssdk',