1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 14:45:14 +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

@@ -109,9 +109,9 @@ class ZoomIE(InfoExtractor):
subtitles = {}
for _type in ('transcript', 'cc', 'chapter'):
if data.get('%sUrl' % _type):
if data.get(f'{_type}Url'):
subtitles[_type] = [{
'url': urljoin(base_url, data['%sUrl' % _type]),
'url': urljoin(base_url, data[f'{_type}Url']),
'ext': 'vtt',
}]
@@ -126,7 +126,7 @@ class ZoomIE(InfoExtractor):
'format_id': 'view',
'ext': 'mp4',
'filesize_approx': parse_filesize(str_or_none(traverse_obj(data, ('recording', 'fileSizeInMB')))),
'preference': 0
'preference': 0,
})
if data.get('shareMp4Url'):
@@ -137,7 +137,7 @@ class ZoomIE(InfoExtractor):
'height': int_or_none(traverse_obj(data, ('shareResolvtions', 1))),
'format_id': 'share',
'ext': 'mp4',
'preference': -1
'preference': -1,
})
view_with_share_url = data.get('viewMp4WithshareUrl')
@@ -149,7 +149,7 @@ class ZoomIE(InfoExtractor):
'url': view_with_share_url,
'format_id': 'view_with_share',
'ext': 'mp4',
'preference': 1
'preference': 1,
})
return {