1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-03-07 23:00:25 +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:
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

@@ -16,17 +16,17 @@ class CozyTVIE(InfoExtractor):
'was_live': True,
'duration': 7981,
},
'params': {'skip_download': True}
'params': {'skip_download': True},
}]
def _real_extract(self, url):
uploader, date = self._match_valid_url(url).groups()
id = f'{uploader}-{date}'
data_json = self._download_json(f'https://api.cozy.tv/cache/{uploader}/replay/{date}', id)
video_id = f'{uploader}-{date}'
data_json = self._download_json(f'https://api.cozy.tv/cache/{uploader}/replay/{date}', video_id)
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
f'https://cozycdn.foxtrotstream.xyz/replays/{uploader}/{date}/index.m3u8', id, ext='mp4')
f'https://cozycdn.foxtrotstream.xyz/replays/{uploader}/{date}/index.m3u8', video_id, ext='mp4')
return {
'id': id,
'id': video_id,
'title': data_json.get('title'),
'uploader': data_json.get('user') or uploader,
'upload_date': unified_strdate(data_json.get('date')),