mirror of
https://github.com/ihmily/DouyinLiveRecorder.git
synced 2025-12-26 13:52:34 +08:00
fix: change user-agent for bilibili-h5
This commit is contained in:
parent
b3f110e3ec
commit
92f5fbf4b8
@ -650,7 +650,7 @@ def get_bilibili_room_info_h5(url: str, proxy_addr: OptionalStr = None, cookies:
|
||||
headers = {
|
||||
'origin': 'https://live.bilibili.com',
|
||||
'referer': 'https://live.bilibili.com/',
|
||||
'user-agent': 'ios/7.830 (ios 17.0; ; iPhone 15 (A2846/A3089/A3090/A3092))',
|
||||
'user-agent': 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36 Edg/121.0.0.0',
|
||||
}
|
||||
if cookies:
|
||||
headers['Cookie'] = cookies
|
||||
@ -2977,4 +2977,4 @@ def get_shopee_stream_url(url: str, proxy_addr: OptionalStr = None, cookies: Opt
|
||||
result['title'] = json_data['data']['session']['title']
|
||||
result['flv_url'] = flv_url
|
||||
result['record_url'] = flv_url
|
||||
return result
|
||||
return result
|
||||
2
main.py
2
main.py
@ -66,7 +66,7 @@ config_file = f'{script_path}/config/config.ini'
|
||||
url_config_file = f'{script_path}/config/URL_config.ini'
|
||||
backup_dir = f'{script_path}/backup_config'
|
||||
text_encoding = 'utf-8-sig'
|
||||
rstr = r"[\/\\\:\*\?\"\<\>\|&#.。,, ~!·]"
|
||||
rstr = r"[\/\\\:\*\?\"\<\>\|&#.。,, ~!· ]"
|
||||
ffmpeg_path = f"{script_path}/ffmpeg.exe"
|
||||
default_path = f'{script_path}/downloads'
|
||||
os.makedirs(default_path, exist_ok=True)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user