Код: Выделить всё
from telethon.sync import TelegramClient
api_id = '?????'
api_hash = '????????'
with TelegramClient('sync', api_id, api_hash) as client:
chat_entity = client.get_entity('https://t.me/new_ton_news')
for message in client.iter_messages(chat_entity):
print(message.sender_id, ':', message.text)
Подробнее здесь: https://stackoverflow.com/questions/783 ... s-telethon