app add record
continuous-integration/drone/push Build is passing

This commit is contained in:
jianxin committed 2024-01-17 15:58:26 +08:00
1 parent 65cc742211
commit d2a1206814
2 files changed
+46 -13

No files matched your search

+32 -1
View File
@@ -1 +1,32 @@
import os
from itertools import chain
message_content = ""
images = []
data = [
[
{
"height": 756,
"image_key": "img_v3_0277_2c2fbab4-8b13-4a6a-a273-e0d1d47b4ecg",
"tag": "img",
"width": 529,
}
],
[
{"style": [], "tag": "text", "text": "11111111"},
{"style": [], "tag": "at", "user_id": "@_user_1", "user_name": "官方应用指令"},
{"style": [], "tag": "text", "text": ""},
],
]
for item in chain.from_iterable(data):
if item.get("tag") == "text":
message_content += item["text"]
if item.get("tag") == "img":
images.append(item["image_key"])
print(message_content)
print(images)