From 63787f174398207b0b1aa2daded10a327e9f644e Mon Sep 17 00:00:00 2001 From: Hmily <114978440+ihmily@users.noreply.github.com> Date: Wed, 27 Aug 2025 18:10:28 +0800 Subject: [PATCH] fix: update liveme room id match (#1192) --- src/spider.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/spider.py b/src/spider.py index 1f0feac..279b21a 100644 --- a/src/spider.py +++ b/src/spider.py @@ -2061,6 +2061,12 @@ async def get_liveme_stream_url(url: str, proxy_addr: OptionalStr = None, cookie if cookies: headers['Cookie'] = cookies + html_str = await async_req(url, proxy_addr=proxy_addr, headers=headers, abroad=True) + if 'index.html' not in url: + match_url = re.search('', html_str) + if match_url: + url = match_url.group(1) + room_id = url.split("/index.html")[0].rsplit('/', maxsplit=1)[-1] sign_data = execjs.compile(open(f'{JS_SCRIPT_PATH}/liveme.js').read()).call('sign', room_id, f'{JS_SCRIPT_PATH}/crypto-js.min.js') @@ -3232,4 +3238,4 @@ async def get_picarto_stream_url(url: str, proxy_addr: OptionalStr = None, cooki title = json_data['channel']['title'] m3u8_url = f"https://1-edge1-us-newyork.picarto.tv/stream/hls/golive+{anchor_name}/index.m3u8" result |= {'is_live': True, 'title': title, 'm3u8_url': m3u8_url, 'record_url': m3u8_url} - return result + return result \ No newline at end of file