]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/agora.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / agora.py
index 714414bd4137427472c0dbfee5914142b3d10f92..9835584254124c203ee1349482077aaed82bcbfe 100644 (file)
@@ -55,7 +55,6 @@ def _real_extract(self, url):
         if meta['files'].get('dash'):
             formats.extend(self._extract_mpd_formats(base_url + meta['files']['dash'], video_id))
 
-        self._sort_formats(formats)
         return {
             'id': video_id,
             'formats': formats,
@@ -169,7 +168,7 @@ def _real_extract(self, url):
         for ext in ('aac', 'mp3'):
             url_data = self._download_json(
                 f'https://api.podcast.radioagora.pl/api4/getSongUrl?podcast_id={media_id}&device_id={uuid.uuid4()}&ppre=false&audio={ext}',
-                media_id, 'Downloading podcast %s URL' % ext)
+                media_id, f'Downloading podcast {ext} URL')
             # prevents inserting the mp3 (default) multiple times
             if 'link_ssl' in url_data and f'.{ext}' in url_data['link_ssl']:
                 formats.append({
@@ -179,7 +178,6 @@ def _real_extract(self, url):
                     'acodec': ext,
                 })
 
-        self._sort_formats(formats)
         return {
             'id': media_id,
             'formats': formats,
@@ -208,8 +206,8 @@ class TokFMAuditionIE(InfoExtractor):
     }
 
     @staticmethod
-    def _create_url(id):
-        return f'https://audycje.tokfm.pl/audycja/{id}'
+    def _create_url(video_id):
+        return f'https://audycje.tokfm.pl/audycja/{video_id}'
 
     def _real_extract(self, url):
         audition_id = self._match_id(url)