1
0
Fork 0

[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
commit add96eb9f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
915 changed files with 7028 additions and 7247 deletions

View file

@ -46,7 +46,7 @@ class TvigleIE(InfoExtractor):
}, {
'url': 'https://cloud.tvigle.ru/video/5267604/',
'only_matching': True,
}
},
]
def _real_extract(self, url):
@ -63,7 +63,7 @@ class TvigleIE(InfoExtractor):
webpage, 'video id')
video_data = self._download_json(
'http://cloud.tvigle.ru/api/play/video/%s/' % video_id, display_id)
f'http://cloud.tvigle.ru/api/play/video/{video_id}/', display_id)
item = video_data['playlist']['items'][0]
@ -76,7 +76,7 @@ class TvigleIE(InfoExtractor):
msg=error_message, countries=self._GEO_COUNTRIES)
else:
raise ExtractorError(
'%s returned error: %s' % (self.IE_NAME, error_message),
f'{self.IE_NAME} returned error: {error_message}',
expected=True)
title = item['title']
@ -115,7 +115,7 @@ class TvigleIE(InfoExtractor):
item, lambda x: x['video_files_size'][vcodec][format_id]))
formats.append({
'url': video_url,
'format_id': '%s-%s' % (vcodec, format_id),
'format_id': f'{vcodec}-{format_id}',
'vcodec': vcodec,
'height': int_or_none(height),
'filesize': filesize,