mirror of
https://github.com/ihmily/DouyinLiveRecorder.git
synced 2025-12-26 05:48:32 +08:00
fix: update winktv live record
This commit is contained in:
parent
dbf77669d0
commit
c39bc4fd81
7
main.py
7
main.py
@ -4,7 +4,7 @@
|
||||
Author: Hmily
|
||||
GitHub: https://github.com/ihmily
|
||||
Date: 2023-07-17 23:52:05
|
||||
Update: 2024-09-18 12:30:12
|
||||
Update: 2024-09-19 01:50:12
|
||||
Copyright (c) 2023-2024 by Hmily, All Rights Reserved.
|
||||
Function: Record live stream video.
|
||||
"""
|
||||
@ -676,6 +676,7 @@ def start_record(url_data: tuple, count_variable: int = -1):
|
||||
proxy_address = proxy_addr_bak if proxy_addr_bak else None
|
||||
|
||||
# print(f'\r代理地址:{proxy_address}')
|
||||
# print(f'\r全局代理:{global_proxy}')
|
||||
print(f"\r运行新线程,传入地址 {record_url}")
|
||||
while True:
|
||||
try:
|
||||
@ -1111,10 +1112,12 @@ def start_record(url_data: tuple, count_variable: int = -1):
|
||||
"-correct_ts_overflow", "1",
|
||||
]
|
||||
|
||||
add_headers_list = ['PandaTV', '千度热播']
|
||||
add_headers_list = ['PandaTV', '千度热播', 'WinkTV']
|
||||
if platform in add_headers_list:
|
||||
if platform == 'PandaTV':
|
||||
headers = 'origin:https://www.pandalive.co.kr'
|
||||
elif platform == 'WinkTV':
|
||||
headers = 'origin:https://www.winktv.co.kr'
|
||||
else:
|
||||
headers = 'referer:https://qiandurebo.com'
|
||||
ffmpeg_command.insert(11, "-headers")
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Author: Hmily
|
||||
GitHub: https://github.com/ihmily
|
||||
Date: 2023-07-15 23:15:00
|
||||
Update: 2024-09-14 12:18:00
|
||||
Update: 2024-09-19 01:50:12
|
||||
Copyright (c) 2023 by Hmily, All Rights Reserved.
|
||||
Function: Get live stream data.
|
||||
"""
|
||||
@ -1180,7 +1180,8 @@ def get_winktv_stream_data(url: str, proxy_addr: Union[str, None] = None, cookie
|
||||
'accept': 'application/json, text/plain, */*',
|
||||
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
'referer': 'https://www.winktv.co.kr/',
|
||||
'referer': 'https://www.winktv.co.kr',
|
||||
'origin': 'https://www.winktv.co.kr',
|
||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0',
|
||||
|
||||
}
|
||||
@ -1209,8 +1210,9 @@ def get_winktv_stream_data(url: str, proxy_addr: Union[str, None] = None, cookie
|
||||
else:
|
||||
raise RuntimeError(json_data['errorData']['code'], json_data['message'])
|
||||
m3u8_url = json_data['PlayList']['hls'][0]['url']
|
||||
play_url_list = get_play_url_list(m3u8=m3u8_url, proxy=proxy_addr, header=headers, abroad=True)
|
||||
result['m3u8_url'] = m3u8_url
|
||||
result['play_url_list'] = get_play_url_list(m3u8=m3u8_url, proxy=proxy_addr, header=headers, abroad=True)
|
||||
result['play_url_list'] = play_url_list
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user