From c40a10235d6dc59ebdebc45bdebedef8dbca7c8b Mon Sep 17 00:00:00 2001 From: ihmily <114978440+ihmily@users.noreply.github.com> Date: Thu, 5 Jun 2025 11:58:08 +0800 Subject: [PATCH] fix: update blued stream fetch --- main.py | 6 +++--- src/spider.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 9e7bf6e..e0a1e66 100644 --- a/main.py +++ b/main.py @@ -586,9 +586,8 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None: port_info = asyncio.run(stream.get_bilibili_stream_url( json_data, video_quality=record_quality, cookies=bili_cookie, proxy_addr=proxy_address)) - elif record_url.find("https://www.redelight.cn/") > -1 or \ - record_url.find("https://www.xiaohongshu.com/") > -1 or \ - record_url.find("http://xhslink.com/") > -1: + elif record_url.find("http://xhslink.com/") > -1 or \ + record_url.find("https://www.xiaohongshu.com/") > -1: platform = '小红书直播' with semaphore: port_info = asyncio.run(spider.get_xhs_stream_url( @@ -1106,6 +1105,7 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None: '17Live': 'referer:https://17.live/en/live/6302408', '浪Live': 'referer:https://www.lang.live', 'shopee': f'origin:{live_domain}', + 'Blued直播': 'referer:https://app.blued.cn' } headers = record_headers.get(platform) diff --git a/src/spider.py b/src/spider.py index 396e5c1..a036902 100644 --- a/src/spider.py +++ b/src/spider.py @@ -804,7 +804,7 @@ async def get_blued_stream_url(url: str, proxy_addr: OptionalStr = None, cookies result = {"anchor_name": anchor_name, "is_live": False} if live_status: - m3u8_url = "http:" + json_data['liveInfo']['liveUrl'] + m3u8_url = json_data['liveInfo']['liveUrl'] result |= {"is_live": True, "m3u8_url": m3u8_url, 'record_url': m3u8_url} return result