【问题标题】:Telethon issue, need to read messages from channelsTelethon 问题,需要从频道读取消息
【发布时间】:2019-11-26 19:43:23
【问题描述】:

我在这里阅读了很多答案并尝试了他们的代码,但我无法让这些示例为我工作,我不明白为什么。

我想从电报频道捕获消息,但没有一种 Telehon 方法适合我...

我正在使用电视节目,但如何使用并不重要。我只需要捕获这些消息。

from telethon import TelegramClient, events,utils
from telethon.tl.functions.messages import GetFullChatRequest
from telethon.tl.functions.messages import GetHistoryRequest
from telethon.tl.functions.channels import GetChannelsRequest
from telethon.tl.functions.contacts import ResolveUsernameRequest
from telethon.tl.types import PeerUser, PeerChat, PeerChannel , sync
import re


client = TelegramClient('session_name', api id, api hash )
client.start()
my_self=client.get_me()
print(myself)

这是我得到的输出:

 C:/Users/Riccardo/Desktop/yobitpumpR.py:15: RuntimeWarning: coroutine 
 'AuthMethods._start' was never awaited

 C:/Users/Riccardo/Desktop/yobitpumpR.py:19: RuntimeWarning: coroutine 
 'get_me' was never awaited
 <coroutine object get_me at 0x00000083F93E9410>

我应该如何进行?

【问题讨论】:

  • 这是怎么连接到java的?请删除误导性标签。
  • 对不起我的错误
  • @Richard - 找到解决方案了吗?通过此处和其他平台上的解决方案来存储数据。没有工作。

标签: python warnings bots telegram


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2022-07-17
    • 1970-01-01
    • 2021-08-20
    • 2018-05-02
    • 2021-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多