mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-28 21:20:48 +00:00
[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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user