0

I am looking for a way to extrapolate from a telegram group all messages in which some words contain a series of characters.

I managed to create a snippet that extracts all the messages that contain a word, but I have not found a direct way to also search for words that contain certain characters within them.

example if I want to search for messages that contain the word "basketball" I just need the following code:

async for message in client.iter_messages(chat_id, search='basket'):
        print(message.text)

however, this code also does not find messages where the word "basketball" is present

I would need for that a search that analyzes even if the searched term is inside other word, so it would have to search by characters and not by word

is there any way to do it quickly?

jamesjes
  • 11
  • 2

0 Answers0