From 9caecc1cf5bd7b350ab263fdd58e7c577f68b802 Mon Sep 17 00:00:00 2001 From: wbt5 Date: Mon, 5 Jul 2021 00:12:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E4=BC=81?= =?UTF-8?q?=E9=B9=85=E7=94=B5=E7=AB=9E=E5=BC=B9=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复:企鹅电竞弹幕解包时,有一类消息type属性为空时导致判断出错的问题。 --- danmu/danmaku/egame.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/danmu/danmaku/egame.py b/danmu/danmaku/egame.py index d03bee3..d1b7d15 100644 --- a/danmu/danmaku/egame.py +++ b/danmu/danmaku/egame.py @@ -51,7 +51,8 @@ class eGame: if body: bin_datas = body['bin_data'] for bin_data in bin_datas: - if bin_data['type'] in (0, 3, 9): + # if bin_data['type'] in (0, 3, 9): + if bin_data.get('type', '') in (0, 3, 9): msg['name'] = bin_data['nick'] msg['content'] = bin_data['content'] msg['msg_type'] = 'danmaku' @@ -230,6 +231,8 @@ class MessageDecode: value, position = self.f9(i, s_position) elif type == 12: value, position = self.f12(i, s_position) + elif type == 13: + value, position = self.f13(i, s_position) i = '' From d0b15785ea22c87732e9d606d305fb71c9205d23 Mon Sep 17 00:00:00 2001 From: wbt5 Date: Mon, 5 Jul 2021 00:15:34 +0800 Subject: [PATCH 2/2] :bulb: Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5aa0a90..a8e6618 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ 有直播平台失效或新增其他平台解析的,可发 [issue](https://github.com/wbt5/real-url/issues/new)。 ## 更新 +2021.7.4::art:更新哔哩哔哩直播源;:bug:修复Acfun直播弹幕;:bug:修复企鹅电竞弹幕。 + 2021.6.20::sparkles:新增爱奇艺体育直播。 2021.6.13::bug:修复腾讯体育。