From 5e5b43d55c0df7e460e0bc359470975fda9b40ac Mon Sep 17 00:00:00 2001 From: bbll <768963019@QQ.com> Date: Fri, 2 Jul 2021 16:38:54 +0800 Subject: [PATCH] fix huya danmu --- danmu/danmaku/huya.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/danmu/danmaku/huya.py b/danmu/danmaku/huya.py index 9ee82df..e7fa746 100644 --- a/danmu/danmaku/huya.py +++ b/danmu/danmaku/huya.py @@ -22,11 +22,11 @@ class Huya: async with aiohttp.ClientSession() as session: async with session.get(url, headers=headers) as resp: room_page = await resp.text() - m = re.search(r"ayyuid: +'([0-9]+)'", room_page, re.MULTILINE) + m = re.search(r"lYyid\":([0-9]+)", room_page, re.MULTILINE) ayyuid = m.group(1) - m = re.search(r"TOPSID += +'([0-9]+)'", room_page, re.MULTILINE) + m = re.search(r"lChannelId\":([0-9]+)", room_page, re.MULTILINE) tid = m.group(1) - m = re.search(r"SUBSID += +'([0-9]+)'", room_page, re.MULTILINE) + m = re.search(r"lSubChannelId\":([0-9]+)", room_page, re.MULTILINE) sid = m.group(1) oos = tarscore.TarsOutputStream()