mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-18 04:20:57 +03:00
Use a more sensible limit
parent
6eb299adf1
commit
960ba65c10
|
@ -8,7 +8,7 @@ from telethon.tl.types import ChannelParticipantsSearch
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
offset = 0
|
offset = 0
|
||||||
limit = 100
|
limit = 50
|
||||||
all_participants = []
|
all_participants = []
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
@ -18,7 +18,7 @@ while True:
|
||||||
if not participants.users:
|
if not participants.users:
|
||||||
break
|
break
|
||||||
all_participants.extend(participants.users)
|
all_participants.extend(participants.users)
|
||||||
offset += limit
|
offset += len(participants.users)
|
||||||
sleep(1)
|
sleep(1)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user