python-3.x - 如何在 Telethon 中获取 Telegram 的 channel 描述?

标签 python-3.x telegram telethon

我正在使用 Telethon 编写 Telegram 客户端。我如何获得 channel 描述? get_entity方法不提供 channel 说明。

最佳答案

GetFullChannelRequest方法

from telethon.tl.functions.channels import GetFullChannelRequest
# creating client here
ch = client.get_entity("@mychannel")
ch_full = client(GetFullChannelRequest(channel=ch))
ch_full.full_chat.about # this is what you need

所以你可能想检查 full_chat属性,因为它包含其余信息

关于python-3.x - 如何在 Telethon 中获取 Telegram 的 channel 描述?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48432287/

相关文章:

php - Telegram Bot API : how to send a photo using PHP?

telegram - 如何通过 Bot API 获取 Telegram 组中所有消息的列表?

python - 带有 id 的 Channel 的 Telethon 阅读消息

python - 'numpy.float64' 对象不可迭代 - 基于内容的过滤模型

python-3.x - Keras/Tensorflow 模型适用于验证图像,但不适用于真实世界数据

python - 如何使用 await 表达式?

java - 在android项目中使用Kotlogram库

python - 比较python类中的变量

python - 如何使用 Telethon 捕获 Telegram 中的 channel 消息?

python-3.x - Telethon 在 python 中的第一步