but I could not figure it out. How to get more than 200 participants with the GetParticipantsRequest function?
def get_channel_users(Config):
offset = 0
limit = 100
all_users = []
channel = InputChannel(channel_id, channel_hash)
client = TelegramClient(StringSession(Config["Telegram"]["session"]), Config["Telegram"]["api_id"], Config["Telegram"]["api_hash"])
client.start()
while True:
result = client(GetParticipantsRequest(
channel=channel,
filter=ChannelParticipantsSearch(''),
offset=offset,
limit=limit,
hash=0
))
users = result.users
all_users.extend(users)
if len(users) < limit:
break
offset += limit
return all_users
search by alphabet And get users
Is there an example? Please send it to pm
https://github.com/LonamiWebs/Telethon/issues/580
Обсуждают сегодня