mirror of
https://github.com/ihmily/DouyinLiveRecorder.git
synced 2025-12-25 21:36:46 +08:00
fix: handle twitch live record ad issues
This commit is contained in:
parent
ba8979e4ee
commit
952eeb9b7c
@ -23,7 +23,7 @@ import json
|
||||
import execjs
|
||||
import urllib.request
|
||||
from . import JS_SCRIPT_PATH, utils
|
||||
from .utils import trace_error_decorator
|
||||
from .utils import trace_error_decorator, generate_random_string
|
||||
from .logger import script_path
|
||||
from .room import get_sec_user_id, get_unique_id, UnsupportedUrlError
|
||||
from .http_clients.async_http import async_req
|
||||
@ -1970,6 +1970,7 @@ async def get_twitchtv_stream_data(url: str, proxy_addr: OptionalStr = None, coo
|
||||
'Accept-Language': 'en-US',
|
||||
'Referer': 'https://www.twitch.tv/',
|
||||
'Client-ID': 'kimne78kx3ncx6brgo4mv6wki5h1ko',
|
||||
'device-id': generate_random_string(16).lower(),
|
||||
}
|
||||
|
||||
if cookies:
|
||||
@ -3015,4 +3016,4 @@ async def get_faceit_stream_data(url: str, proxy_addr: OptionalStr = None, cooki
|
||||
result['anchor_name'] = anchor_name
|
||||
else:
|
||||
result = {'anchor_name': anchor_name, 'is_live': False}
|
||||
return result
|
||||
return result
|
||||
Loading…
x
Reference in New Issue
Block a user