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/litv.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/litv.py')
-rw-r--r-- | yt_dlp/extractor/litv.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/litv.py b/yt_dlp/extractor/litv.py index 1003fb2fd..93f926a9f 100644 --- a/yt_dlp/extractor/litv.py +++ b/yt_dlp/extractor/litv.py @@ -113,7 +113,7 @@ class LiTVIE(InfoExtractor): endpoint = 'getMainUrlNoAuth' video_data = self._download_json( f'https://www.litv.tv/vod/ajax/{endpoint}', video_id, - data=json.dumps(payload).encode('utf-8'), + data=json.dumps(payload).encode(), headers={'Content-Type': 'application/json'}) if not video_data.get('fullpath'): @@ -121,8 +121,8 @@ class LiTVIE(InfoExtractor): if error_msg == 'vod.error.outsideregionerror': self.raise_geo_restricted('This video is available in Taiwan only') if error_msg: - raise ExtractorError('%s said: %s' % (self.IE_NAME, error_msg), expected=True) - raise ExtractorError('Unexpected result from %s' % self.IE_NAME) + raise ExtractorError(f'{self.IE_NAME} said: {error_msg}', expected=True) + raise ExtractorError(f'Unexpected result from {self.IE_NAME}') formats = self._extract_m3u8_formats( video_data['fullpath'], video_id, ext='mp4', |