1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 16:45:17 +00:00

[cleanup] Use random.choices (#5800)

Authored by: freezboltz
This commit is contained in:
Anant Murmu
2022-12-30 08:13:49 +05:30
committed by GitHub
parent e107c2b8cf
commit efa944f4bc
11 changed files with 18 additions and 19 deletions

View File

@ -210,7 +210,7 @@ class FunimationIE(FunimationBaseIE):
page = self._download_json(
'https://www.funimation.com/api/showexperience/%s/' % experience_id,
display_id, headers=headers, expected_status=403, query={
'pinst_id': ''.join([random.choice(string.digits + string.ascii_letters) for _ in range(8)]),
'pinst_id': ''.join(random.choices(string.digits + string.ascii_letters, k=8)),
}, note=f'Downloading {format_name} JSON')
sources = page.get('items') or []
if not sources: