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

@@ -37,7 +37,7 @@ class RumbleEmbedIE(InfoExtractor):
'duration': 234,
'uploader': 'WMAR',
'live_status': 'not_live',
}
},
}, {
'url': 'https://rumble.com/embed/vslb7v',
'md5': '7418035de1a30a178b8af34dc2b6a52b',
@@ -53,7 +53,7 @@ class RumbleEmbedIE(InfoExtractor):
'duration': 901,
'uploader': 'CTNews',
'live_status': 'not_live',
}
},
}, {
'url': 'https://rumble.com/embed/vunh1h',
'info_dict': {
@@ -73,12 +73,12 @@ class RumbleEmbedIE(InfoExtractor):
{
'url': r're:https://.+\.vtt',
'name': 'English',
'ext': 'vtt'
}
]
'ext': 'vtt',
},
],
},
},
'params': {'skip_download': True}
'params': {'skip_download': True},
}, {
'url': 'https://rumble.com/embed/v1essrt',
'info_dict': {
@@ -93,7 +93,7 @@ class RumbleEmbedIE(InfoExtractor):
'uploader': 'Lofi Girl',
'live_status': 'is_live',
},
'params': {'skip_download': True}
'params': {'skip_download': True},
}, {
'url': 'https://rumble.com/embed/v1amumr',
'info_dict': {
@@ -110,7 +110,7 @@ class RumbleEmbedIE(InfoExtractor):
'uploader': 'Rumble Events',
'live_status': 'was_live',
},
'params': {'skip_download': True}
'params': {'skip_download': True},
}, {
'url': 'https://rumble.com/embed/ufe9n.v5pv5f',
'only_matching': True,
@@ -133,7 +133,7 @@ class RumbleEmbedIE(InfoExtractor):
'uploader': 'Mr Producer Media',
'upload_date': '20220610',
'live_status': 'not_live',
}
},
},
]
@@ -198,7 +198,7 @@ class RumbleEmbedIE(InfoExtractor):
'filesize': 'size',
'width': 'w',
'height': 'h',
}, expected_type=lambda x: int(x) or None)
}, expected_type=lambda x: int(x) or None),
})
subtitles = {
@@ -258,7 +258,7 @@ class RumbleIE(InfoExtractor):
'dislike_count': int,
'view_count': int,
'live_status': 'not_live',
}
},
}, {
'url': 'http://www.rumble.com/vDMUM1?key=value',
'only_matching': True,
@@ -353,7 +353,7 @@ class RumbleIE(InfoExtractor):
r'<span data-js="rumbles_up_votes">\s*([\d,.KM]+)', webpage, 'like count', default=None)),
'dislike_count': parse_count(self._search_regex(
r'<span data-js="rumbles_down_votes">\s*([\d,.KM]+)', webpage, 'dislike count', default=None)),
'description': clean_html(get_element_by_class('media-description', webpage))
'description': clean_html(get_element_by_class('media-description', webpage)),
}
@@ -377,7 +377,7 @@ class RumbleChannelIE(InfoExtractor):
def entries(self, url, playlist_id):
for page in itertools.count(1):
try:
webpage = self._download_webpage(f'{url}?page={page}', playlist_id, note='Downloading page %d' % page)
webpage = self._download_webpage(f'{url}?page={page}', playlist_id, note=f'Downloading page {page}')
except ExtractorError as e:
if isinstance(e.cause, HTTPError) and e.cause.status == 404:
break