diff options
author | Anant Murmu <freezboltz@gmail.com> | 2022-12-30 08:13:49 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-30 08:13:49 +0530 |
commit | efa944f4bc892321a0d01dcddb210405761ecada (patch) | |
tree | 108064b9f18a7a18d7cc0a75b256225a98edd581 /yt_dlp/extractor/viu.py | |
parent | e107c2b8cf8d6f3506d07bc64fc243682ee49b1e (diff) |
[cleanup] Use `random.choices` (#5800)
Authored by: freezboltz
Diffstat (limited to 'yt_dlp/extractor/viu.py')
-rw-r--r-- | yt_dlp/extractor/viu.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/extractor/viu.py b/yt_dlp/extractor/viu.py index 19d48234e..dd4cad7ba 100644 --- a/yt_dlp/extractor/viu.py +++ b/yt_dlp/extractor/viu.py @@ -251,7 +251,7 @@ class ViuOTTIE(InfoExtractor): return self._user_token def _get_token(self, country_code, video_id): - rand = ''.join(random.choice('0123456789') for _ in range(10)) + rand = ''.join(random.choices('0123456789', k=10)) return self._download_json( f'https://api-gateway-global.viu.com/api/auth/token?v={rand}000', video_id, headers={'Content-Type': 'application/json'}, note='Getting bearer token', |