1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-19 16:05: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

@@ -40,11 +40,11 @@ class TelegraafIE(InfoExtractor):
videoId
}
}
}''' % article_id,
}''' % article_id, # noqa: UP031
})['data']['article']['videos'][0]['videoId']
item = self._download_json(
'https://content.tmgvideo.nl/playlist/item=%s/playlist.json' % video_id,
f'https://content.tmgvideo.nl/playlist/item={video_id}/playlist.json',
video_id)['items'][0]
title = item['title']
@@ -62,7 +62,7 @@ class TelegraafIE(InfoExtractor):
formats.extend(self._extract_mpd_formats(
manifest_url, video_id, mpd_id='dash', fatal=False))
else:
self.report_warning('Unknown adaptive format %s' % ext)
self.report_warning(f'Unknown adaptive format {ext}')
for location in locations.get('progressive', []):
src = try_get(location, lambda x: x['sources'][0]['src'])
if not src:
@@ -72,7 +72,7 @@ class TelegraafIE(InfoExtractor):
'url': src,
'width': int_or_none(location.get('width')),
'height': int_or_none(location.get('height')),
'format_id': 'http' + ('-%s' % label if label else ''),
'format_id': 'http' + (f'-{label}' if label else ''),
})
return {