From da7c694dfb0c33169131bd92e02e916096cb74c8 Mon Sep 17 00:00:00 2001 From: taizan-hokuto <55448286+taizan-hokuto@users.noreply.github.com> Date: Wed, 6 May 2020 01:23:19 +0900 Subject: [PATCH] Modify parsing membership --- pytchat/processors/compatible/renderer/membership.py | 6 +++--- pytchat/processors/default/renderer/membership.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pytchat/processors/compatible/renderer/membership.py b/pytchat/processors/compatible/renderer/membership.py index b6b8fe4..5721549 100644 --- a/pytchat/processors/compatible/renderer/membership.py +++ b/pytchat/processors/compatible/renderer/membership.py @@ -35,6 +35,6 @@ class LiveChatMembershipItemRenderer(BaseRenderer): } def get_message(self, renderer): - message = (renderer["headerSubtext"]["runs"][0]["text"] - )+' / '+(renderer["authorName"]["simpleText"]) - return message + message = ''.join([mes.get("text", "") for mes in renderer["headerSubtext"]["runs"]]) + return message, [message] + diff --git a/pytchat/processors/default/renderer/membership.py b/pytchat/processors/default/renderer/membership.py index a7ac3cf..726b617 100644 --- a/pytchat/processors/default/renderer/membership.py +++ b/pytchat/processors/default/renderer/membership.py @@ -10,6 +10,6 @@ class LiveChatMembershipItemRenderer(BaseRenderer): self.author.isChatSponsor = True def get_message(self, renderer): - message = (renderer["headerSubtext"]["runs"][0]["text"] - )+' / '+(renderer["authorName"]["simpleText"]) - return message + message = ''.join([mes.get("text", "") for mes in renderer["headerSubtext"]["runs"]]) + return message, [message] +