【发布时间】:2020-09-11 04:56:50
【问题描述】:
我想获取我的频道/聊天中所有用户的列表。人们建议使用 telethon,但我无法开始使用 telethone 并想改用请求。你能帮帮我吗?
我试过了
import json
import requests
URL = "https://api.telegram.org/bot{}/".format(TOKEN)
url = URL + "getFullChat?chat_id={}".format(chat_id)
req = requests.get(url)
TOKEN 是我的机器人 ID,chat_id 是聊天,我想从中获取列表。
req.content
还给我
b'{"ok":false,"error_code":404,"description":"Not Found"}'
【问题讨论】:
标签: python python-requests telegram