1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-24 00:49:06 +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

@@ -22,7 +22,7 @@ class WebOfStoriesIE(InfoExtractor):
'thumbnail': r're:^https?://.*\.jpg$',
'description': 'Hans Bethe talks about calculating the temperature of the sun',
'duration': 238,
}
},
}, {
'url': 'http://www.webofstories.com/play/55908',
'md5': '2985a698e1fe3211022422c4b5ed962c',
@@ -79,19 +79,15 @@ class WebOfStoriesIE(InfoExtractor):
ms_prefix = 'mini_sites/'
if is_great_life_series:
mp4_url = '{0:}lives/{1:}/{2:}.mp4'.format(
self._VIDEO_DOMAIN, speaker_id, story_filename)
mp4_url = f'{self._VIDEO_DOMAIN}lives/{speaker_id}/{story_filename}.mp4'
rtmp_ext = 'flv'
streamer = self._GREAT_LIFE_STREAMER
play_path = 'stories/{0:}/{1:}'.format(
speaker_id, story_filename)
play_path = f'stories/{speaker_id}/{story_filename}'
else:
mp4_url = '{0:}{1:}{2:}/{3:}.mp4'.format(
self._VIDEO_DOMAIN, ms_prefix, speaker_id, story_filename)
mp4_url = f'{self._VIDEO_DOMAIN}{ms_prefix}{speaker_id}/{story_filename}.mp4'
rtmp_ext = 'mp4'
streamer = self._USER_STREAMER
play_path = 'mp4:{0:}{1:}/{2}.mp4'.format(
ms_prefix, speaker_id, story_filename)
play_path = f'mp4:{ms_prefix}{speaker_id}/{story_filename}.mp4'
formats = [{
'format_id': 'mp4_sd',
@@ -132,7 +128,7 @@ class WebOfStoriesPlaylistIE(InfoExtractor):
entries = [
self.url_result(
'http://www.webofstories.com/play/%s' % video_id,
f'http://www.webofstories.com/play/{video_id}',
'WebOfStories', video_id=video_id)
for video_id in orderedSet(re.findall(r'\bid=["\']td_(\d+)', webpage))
]
@@ -145,7 +141,7 @@ class WebOfStoriesPlaylistIE(InfoExtractor):
r'<span id="primaryField">([^<]+)</span>',
webpage, 'field', default=None)
if field:
title += ' (%s)' % field
title += f' ({field})'
if not title:
title = self._search_regex(