From 9da09ef3a99b46a28760a2949175b9dee77a1b87 Mon Sep 17 00:00:00 2001 From: gongfuture Date: Wed, 25 Sep 2024 13:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(nonebot=5Fbison\platform\bil?= =?UTF-8?q?ibili\platforms.py):=20=E4=BF=AE=E6=AD=A3=E4=B8=8B=E6=92=AD?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96=E5=AE=9E=E6=97=B6=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将下播时的图片修改为封面 https://github.com/MountainDash/nonebot-bison/issues/626 --- nonebot_bison/platform/bilibili/platforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot_bison/platform/bilibili/platforms.py b/nonebot_bison/platform/bilibili/platforms.py index e3cfc0ab4..dc1774805 100644 --- a/nonebot_bison/platform/bilibili/platforms.py +++ b/nonebot_bison/platform/bilibili/platforms.py @@ -426,7 +426,7 @@ def get_category(self, status: Info) -> Category: async def parse(self, raw_post: Info) -> Post: url = f"https://live.bilibili.com/{raw_post.room_id}" - pic = [raw_post.cover] if raw_post.category == Category(1) else [raw_post.keyframe] + pic = [raw_post.cover] if (raw_post.category == Category(1) or raw_post.category == Category(3)) else [raw_post.keyframe] title = f"[{self.categories[raw_post.category].rstrip('提醒')}] {raw_post.title}" target_name = f"{raw_post.uname} {raw_post.area_name}" return Post(