mirror of
https://github.com/ihmily/DouyinLiveRecorder.git
synced 2025-12-26 05:48:32 +08:00
fix: update pandatv live record
This commit is contained in:
parent
81fee01a04
commit
3bb1385bbf
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-01 19:02:12
|
||||
Update: 2024-09-01 21:28:33
|
||||
Copyright (c) 2023-2024 by Hmily, All Rights Reserved.
|
||||
Function: Record live stream video.
|
||||
"""
|
||||
@ -1063,6 +1063,10 @@ def start_record(url_data: tuple, count_variable: int = -1):
|
||||
max_muxing_queue_size = "2048"
|
||||
break
|
||||
|
||||
if platform == 'PandaTV':
|
||||
headers = 'origin:https://www.pandalive.co.kr'
|
||||
else:
|
||||
headers = ''
|
||||
ffmpeg_command = [
|
||||
'ffmpeg', "-y",
|
||||
"-v", "verbose",
|
||||
@ -1070,6 +1074,7 @@ def start_record(url_data: tuple, count_variable: int = -1):
|
||||
"-loglevel", "error",
|
||||
"-hide_banner",
|
||||
"-user_agent", user_agent,
|
||||
"-headers", headers,
|
||||
"-protocol_whitelist", "rtmp,crypto,file,http,https,tcp,tls,udp,rtp",
|
||||
"-thread_queue_size", "1024",
|
||||
"-analyzeduration", analyzeduration,
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Author: Hmily
|
||||
GitHub: https://github.com/ihmily
|
||||
Date: 2023-07-15 23:15:00
|
||||
Update: 2024-09-01 19:02:00
|
||||
Update: 2024-09-01 21:28:33
|
||||
Copyright (c) 2023 by Hmily, All Rights Reserved.
|
||||
Function: Get live stream data.
|
||||
"""
|
||||
@ -1045,6 +1045,7 @@ def get_qiandurebo_stream_data(url: str, proxy_addr: Union[str, None] = None, co
|
||||
def get_pandatv_stream_data(url: str, proxy_addr: Union[str, None] = None, cookies: Union[str, None] = None) -> \
|
||||
Dict[str, Any]:
|
||||
headers = {
|
||||
'origin': 'https://www.pandalive.co.kr',
|
||||
'referer': 'https://www.pandalive.co.kr/',
|
||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.58',
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user