mirror of
https://github.com/wbt5/real-url.git
synced 2025-07-28 20:35:55 +08:00
🐛 修复企鹅电竞弹幕
修复:企鹅电竞弹幕解包时,有一类消息type属性为空时导致判断出错的问题。
This commit is contained in:
parent
750ce90471
commit
9caecc1cf5
@ -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 = ''
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user