]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/appletrailers.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / appletrailers.py
index d3d77a1d0b33363251ea145ee855ed2aa3265057..2e0b0a8c932b5690ea12e13249febd9251e729fd 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals
-
 import re
 import json
 
@@ -94,7 +92,7 @@ class AppleTrailersIE(InfoExtractor):
     _JSON_RE = r'iTunes.playURL\((.*?)\);'
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
+        mobj = self._match_valid_url(url)
         movie = mobj.group('movie')
         uploader_id = mobj.group('company')
 
@@ -122,7 +120,6 @@ def _real_extract(self, url):
                             'height': int_or_none(size_data.get('height')),
                             'language': version[:2],
                         })
-                self._sort_formats(formats)
 
                 entries.append({
                     'id': movie + '-' + re.sub(r'[^a-zA-Z0-9]', '', clip_title).lower(),
@@ -187,8 +184,6 @@ def _clean_json(m):
                     'height': int_or_none(format['height']),
                 })
 
-            self._sort_formats(formats)
-
             playlist.append({
                 '_type': 'video',
                 'id': video_id,