]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/youku.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / youku.py
index 61d1ab20908bf1a233cf90624170d9ee824ff337..624975b982564f5a51022ac18f28e5fa22c177f3 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import random
 import re
 import string
@@ -154,13 +151,13 @@ def _real_extract(self, url):
         # request basic data
         basic_data_params = {
             'vid': video_id,
-            'ccode': '0590',
+            'ccode': '0532',
             'client_ip': '192.168.1.1',
             'utid': cna,
             'client_ts': time.time() / 1000,
         }
 
-        video_password = self._downloader.params.get('videopassword')
+        video_password = self.get_param('videopassword')
         if video_password:
             basic_data_params['password'] = video_password
 
@@ -201,7 +198,6 @@ def _real_extract(self, url):
             'width': stream.get('width'),
             'height': stream.get('height'),
         } for stream in data['stream'] if stream.get('channel_type') != 'tail']
-        self._sort_formats(formats)
 
         return {
             'id': video_id,