0

我正在做一个应用程序来从 Telegram 频道下载所有文件。下载时收到错误消息:

telethon.errors.rpcbaseerrors.BadMessageError: Message too old, and it cannot be verified 
whether the server has received a message with this msg_id or not.

有人知道怎么修这个东西吗?

4

1 回答 1

1

我通过此代码测试并下载了所有文件,这很好。(如Fundamentos_de_Matemática_Elementar.pdf

from telethon import TelegramClient

api_id = XXXXX
api_hash = 'a191b0c8c7d88a1c34XXXXXXXXXXXXX'
phone_number = '+98937XXXXXXXX'
######################t##########################
channel_username = 'matematicaEmPDF'
################################################

client = TelegramClient(phone_number,
                    api_id,
                    api_hash,        
        )

client.start(phone=phone_number)

# ---------------------------------------
msgs = client.get_messages(channel_username, limit=100)

for msg in msgs.data:
    if msg.media is not None:
        client.download_media(message=msg)
于 2018-07-19T13:35:56.547 回答