[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>
This commit is contained in:
sepro
2024-06-12 01:09:58 +02:00
committed by GitHub
parent db50f19d76
commit add96eb9f8
915 changed files with 7027 additions and 7246 deletions

View File

@@ -24,9 +24,9 @@ class OlympicsReplayIE(InfoExtractor):
}]
def _real_extract(self, url):
id = self._match_id(url)
video_id = self._match_id(url)
webpage = self._download_webpage(url, id)
webpage = self._download_webpage(url, video_id)
title = self._html_search_meta(('title', 'og:title', 'twitter:title'), webpage)
uuid = self._html_search_meta('episode_uid', webpage)
m3u8_url = self._html_search_meta('video_url', webpage)
@@ -46,7 +46,7 @@ class OlympicsReplayIE(InfoExtractor):
thumbnails.append({
'url': thumbnail,
'width': width,
'height': int_or_none(try_get(width, lambda x: x * height_a / width_a))
'height': int_or_none(try_get(width, lambda x: x * height_a / width_a)),
})
m3u8_url = self._download_json(
f'https://olympics.com/tokenGenerator?url={m3u8_url}', uuid, note='Downloading m3u8 url')
@@ -58,5 +58,5 @@ class OlympicsReplayIE(InfoExtractor):
'thumbnails': thumbnails,
'formats': formats,
'subtitles': subtitles,
**json_ld
**json_ld,
}