]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/wsj.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / wsj.py
index 35fe3036272cd67f80523098f05fd7a6c512275d..7b3f6aa2ae0ee039e7433e03a9d2b578264eabc6 100644 (file)
@@ -76,7 +76,7 @@ def _real_extract(self, url):
             tbr = int_or_none(v.get('bitrate'))
             formats.append({
                 'url': mp4_url,
-                'format_id': 'http' + ('-%d' % tbr if tbr else ''),
+                'format_id': 'http' + (f'-{tbr}' if tbr else ''),
                 'tbr': tbr,
                 'width': int_or_none(v.get('width')),
                 'height': int_or_none(v.get('height')),
@@ -108,7 +108,7 @@ class WSJArticleIE(InfoExtractor):
             'upload_date': '20170221',
             'uploader_id': 'ralcaraz',
             'title': 'Bao Bao the Panda Leaves for China',
-        }
+        },
     }
 
     def _real_extract(self, url):
@@ -117,4 +117,4 @@ def _real_extract(self, url):
         video_id = self._search_regex(
             r'(?:id=["\']video|video-|iframe\.html\?guid=|data-src=["\'])([a-fA-F0-9-]{36})',
             webpage, 'video id')
-        return self.url_result('wsj:%s' % video_id, WSJIE.ie_key(), video_id)
+        return self.url_result(f'wsj:{video_id}', WSJIE.ie_key(), video_id)