mirror of
https://github.com/ihmily/DouyinLiveRecorder.git
synced 2025-12-25 21:36:46 +08:00
fix: update TTinglive
This commit is contained in:
parent
d77760f3c9
commit
271a53621d
8
main.py
8
main.py
@ -752,7 +752,10 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
|
||||
utils.update_config(
|
||||
config_file, 'Cookie', 'flextv_cookie', json_data['new_cookies']
|
||||
)
|
||||
port_info = asyncio.run(stream.get_stream_url(json_data, record_quality, spec=True))
|
||||
if 'play_url_list' in json_data:
|
||||
port_info = asyncio.run(stream.get_stream_url(json_data, record_quality, spec=True))
|
||||
else:
|
||||
port_info = json_data
|
||||
else:
|
||||
logger.error("错误信息: 网络异常,请检查本网络是否能正常访问FlexTV直播平台")
|
||||
|
||||
@ -1207,7 +1210,8 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
|
||||
if show_url:
|
||||
re_plat = ('WinkTV', 'PandaTV', 'ShowRoom', 'CHZZK', 'Youtube')
|
||||
if platform in re_plat:
|
||||
logger.info(f"{platform} | {anchor_name} | 直播源地址: {port_info['m3u8_url']}")
|
||||
logger.info(
|
||||
f"{platform} | {anchor_name} | 直播源地址: {port_info.get('m3u8_url')}")
|
||||
else:
|
||||
logger.info(
|
||||
f"{platform} | {anchor_name} | 直播源地址: {real_url}")
|
||||
|
||||
@ -1375,11 +1375,15 @@ async def get_flextv_stream_data(
|
||||
result["anchor_name"] = anchor_name
|
||||
play_url = await get_flextv_stream_url(url=url, proxy_addr=proxy_addr, cookies=cookies)
|
||||
if play_url:
|
||||
play_url_list = await get_play_url_list(m3u8=play_url, proxy=proxy_addr, header=headers, abroad=True)
|
||||
if play_url_list:
|
||||
result['m3u8_url'] = play_url
|
||||
result['play_url_list'] = play_url_list
|
||||
result['is_live'] = True
|
||||
result['is_live'] = True
|
||||
if '.m3u8' in play_url:
|
||||
play_url_list = await get_play_url_list(m3u8=play_url, proxy=proxy_addr, header=headers, abroad=True)
|
||||
if play_url_list:
|
||||
result['m3u8_url'] = play_url
|
||||
result['play_url_list'] = play_url_list
|
||||
else:
|
||||
result['flv_url'] = play_url
|
||||
result['record_url'] = play_url
|
||||
else:
|
||||
url2 = f'https://www.ttinglive.com/channels/{user_id}'
|
||||
html_str = await async_req(url2, proxy_addr=proxy_addr, headers=headers, abroad=True)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user