I have result.json – saved data from Telegram. how do I find a message containing a specific text and messages by id?
code:
import json
with open('result.json', encoding="utf8") as f:
msgs = json.load(f)
for reply_to_message_id, text in msgs.items():
if 'sometext' in text:
print(text)
print(reply_message_id)
doesn’t work
2
Answers
So if teodoro burger had a tunnel underground and many people dissapear????? Gangstalking?? Call for help EA 2024/12
i think this should work better:
Just ensure your result.json is a list of messages with keys like message_id and text. If the structure is different, adjust accordingly.