mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-15 04:35:19 +00:00
[utils] random_user_agent: Bump versions (#13543)
Closes #5362 Authored by: bashonly
This commit is contained in:
@@ -175,13 +175,6 @@ class BilibiliBaseIE(InfoExtractor):
|
||||
else:
|
||||
note = f'Downloading video formats for cid {cid}'
|
||||
|
||||
# TODO: remove this patch once utils.networking.random_user_agent() is updated, see #13735
|
||||
# playurl requests carrying old UA will be rejected
|
||||
headers = {
|
||||
'User-Agent': f'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{random.randint(118,138)}.0.0.0 Safari/537.36',
|
||||
**(headers or {}),
|
||||
}
|
||||
|
||||
return self._download_json(
|
||||
'https://api.bilibili.com/x/player/wbi/playurl', bvid,
|
||||
query=self._sign_wbi(params, bvid), headers=headers, note=note)['data']
|
||||
|
||||
Reference in New Issue
Block a user