diff options
author | sepro <4618135+seproDev@users.noreply.github.com> | 2024-06-12 01:09:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 01:09:58 +0200 |
commit | add96eb9f84cfffe85682bf2fb85135746994ee8 (patch) | |
tree | 583f209506aa01b2afa3933e504426de575fc43c /yt_dlp/extractor/wsj.py | |
parent | db50f19d76c6870a5a13d0cab9287d684fd7449a (diff) |
[cleanup] Add more ruff rules (#10149)
Authored by: seproDev
Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com>
Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
Diffstat (limited to 'yt_dlp/extractor/wsj.py')
-rw-r--r-- | yt_dlp/extractor/wsj.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/wsj.py b/yt_dlp/extractor/wsj.py index 35fe30362..7b3f6aa2a 100644 --- a/yt_dlp/extractor/wsj.py +++ b/yt_dlp/extractor/wsj.py @@ -76,7 +76,7 @@ class WSJIE(InfoExtractor): 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 @@ class WSJArticleIE(InfoExtractor): 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) |