1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +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

@ -17,7 +17,7 @@ class SwearnetEpisodeIE(InfoExtractor):
'title': 'Episode 1 - Grilled Cheese Sammich',
'season_number': 1,
'thumbnail': 'https://cdn.vidyard.com/thumbnails/232819/_RX04IKIq60a2V6rIRqq_Q_small.jpg',
}
},
}]
def _get_formats_and_subtitle(self, video_source, video_id):
@ -32,7 +32,7 @@ class SwearnetEpisodeIE(InfoExtractor):
else:
formats.extend({
'url': video_mp4.get('url'),
'ext': 'mp4'
'ext': 'mp4',
} for video_mp4 in value)
return formats, subtitles
@ -42,7 +42,7 @@ class SwearnetEpisodeIE(InfoExtractor):
for caption in caption_json:
subs.setdefault(caption.get('language') or 'und', []).append({
'url': caption.get('vttUrl'),
'name': caption.get('name')
'name': caption.get('name'),
})
return subs
@ -75,5 +75,5 @@ class SwearnetEpisodeIE(InfoExtractor):
'season_number': int_or_none(season_number),
'episode_number': int_or_none(episode_number),
'thumbnails': [{'url': thumbnail_url}
for thumbnail_url in traverse_obj(json_data, ('thumbnailUrls', ...))]
for thumbnail_url in traverse_obj(json_data, ('thumbnailUrls', ...))],
}