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

@ -168,7 +168,7 @@ Format: Marked,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text'''
}, data=b'')['token']
links_url = try_get(options, lambda x: x['video']['url']) or (video_base_url + 'link')
self._K = ''.join([random.choice('0123456789abcdef') for _ in range(16)])
self._K = ''.join(random.choices('0123456789abcdef', k=16))
message = bytes_to_intlist(json.dumps({
'k': self._K,
't': token,