mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-07 22:03:10 +03:00
Sleep seems to be optional
parent
5afb8bc66f
commit
7520218e46
|
@ -8,7 +8,7 @@ from telethon.tl.types import ChannelParticipantsSearch
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
offset = 0
|
offset = 0
|
||||||
limit = 50
|
limit = 100
|
||||||
all_participants = []
|
all_participants = []
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
@ -19,7 +19,7 @@ while True:
|
||||||
break
|
break
|
||||||
all_participants.extend(participants.users)
|
all_participants.extend(participants.users)
|
||||||
offset += len(participants.users)
|
offset += len(participants.users)
|
||||||
sleep(1)
|
# sleep(1) # This line seems to be optional, no guarantees!
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that `GetParticipantsRequest` returns [`ChannelParticipants`](https://lonamiwebs.github.io/Telethon/constructors/channels/channel_participants.html), which may have more information you need (like the role of the participants, total count of members, etc.)
|
Note that `GetParticipantsRequest` returns [`ChannelParticipants`](https://lonamiwebs.github.io/Telethon/constructors/channels/channel_participants.html), which may have more information you need (like the role of the participants, total count of members, etc.)
|
Loading…
Reference in New Issue
Block a user