Created base files
This commit is contained in:
13
pytchat/processors/json_display_processor.py
Normal file
13
pytchat/processors/json_display_processor.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import json
|
||||
from .chat_processor import ChatProcessor
|
||||
|
||||
class JsonDisplayProcessor(ChatProcessor):
|
||||
|
||||
def process(self,chat_components: list):
|
||||
if chat_components:
|
||||
for component in chat_components:
|
||||
chatdata = component.get('chatdata')
|
||||
if chatdata:
|
||||
for chat in chatdata:
|
||||
print(json.dumps(chat,ensure_ascii=False)[:200])
|
||||
|
||||
Reference in New Issue
Block a user