Reputation: 21
I scrape messages from a telegram channel with telethon
with TelegramClient('session_name', api_id, api_hash) as client:
for message in client.iter_messages(chat):
print(message.sender_id, ':', message.text)
and i have a problem with scrape interactive smiles from a messages, how i get to fix it?
Screenshot: in a empty spaces should have been a interactive smiles from telegram
I need this smile to scrape Interactive Dice Smile
Upvotes: 0
Views: 382
Reputation: 21
There is in telethon type 'InputMediaDice' with it you can catch all interactive emoticons
with TelegramClient('session_name', api_id, api_hash) as client:
for message in client.iter_messages(channel_link, reply_to = post_num, filter = InputMediaDice('🎲')):
if type(message.media) == MessageMediaDice and message.media.emoticon == '🎲' and message.media.value == 5:
print(message.media.emoticon)
Upvotes: 2