TelegramScraper icon indicating copy to clipboard operation
TelegramScraper copied to clipboard

A wait of 29 seconds is required

Open ljhOfGithub opened this issue 2 years ago • 3 comments

[+] Choose a group to scrape members:
[0] - BitShiba The Shiba Inu Killer | Official Crypto

[+] Enter a Number: 0
[+] Fetching Members ...
Traceback (most recent call last):
  File "scraper.py", line 85, in <module>
    all_participants = client.get_participants(target_group, aggressive=True)
  File "/root/.miniconda3/envs/python38/lib/python3.8/site-packages/telethon/sync.py", line 39, in syncified
    return loop.run_until_complete(coro)
  File "/root/.miniconda3/envs/python38/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/root/.miniconda3/envs/python38/lib/python3.8/site-packages/telethon/client/chats.py", line 507, in get_participants
    return await self.iter_participants(*args, **kwargs).collect()
  File "/root/.miniconda3/envs/python38/lib/python3.8/site-packages/telethon/requestiter.py", line 113, in collect
    async for message in self:
  File "/root/.miniconda3/envs/python38/lib/python3.8/site-packages/telethon/requestiter.py", line 74, in __anext__
    if await self._load_next_chunk():
  File "/root/.miniconda3/envs/python38/lib/python3.8/site-packages/telethon/client/chats.py", line 222, in _load_next_chunk
    results = await self.client(self.requests)
  File "/root/.miniconda3/envs/python38/lib/python3.8/site-packages/telethon/client/users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "/root/.miniconda3/envs/python38/lib/python3.8/site-packages/telethon/client/users.py", line 80, in _call
    raise MultiError(exceptions, results, requests)
telethon.errors.common.MultiError: ([FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), None, FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), None, None, FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)'), FloodWaitError('A wait of 29 seconds is required (caused by GetParticipantsRequest)')], [None, <telethon.tl.types.channels.ChannelParticipants object at 0x7f3c4ccae1f0>, None, None, <telethon.tl.types.channels.ChannelParticipants object at 0x7f3c4cc50d60>, <telethon.tl.types.channels.ChannelParticipants object at 0x7f3c4cd33370>, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None], [<telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12040>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12100>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce121c0>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12280>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12340>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12400>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce124c0>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12580>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12640>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12700>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce127c0>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12880>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12940>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12a00>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12ac0>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12b80>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12c40>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12d00>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12dc0>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12e80>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce12f40>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce13040>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce13100>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce131c0>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce13280>, <telethon.tl.functions.channels.GetParticipantsRequest object at 0x7f3c4ce13340>])

my group is 't.me/bitshibatoken'.I join the group recently.I can't send gif until 2022/4/16 23:18.Is it relevant to the error?

ljhOfGithub avatar Apr 16 '22 14:04 ljhOfGithub

Change from aggressive=true to aggressive=false

anon-user-com avatar Apr 18 '22 11:04 anon-user-com

Change from aggressive=true to aggressive=false

Thanks a lot! Helped me in this case!

hardcore avatar Apr 23 '22 10:04 hardcore

Change from aggressive=true to aggressive=false

Thanks a lot! Helped me in this case!

No problem. You are welcome

anon-user-com avatar Apr 23 '22 12:04 anon-user-com

Again, the correct solution is to handle FloodWait error and actually wait relevant amount of time via https://stackoverflow.com/questions/57529546/how-to-handle-flood-wait-errors-when-using-telethon-sync

fluential avatar Oct 25 '22 22:10 fluential

remove aggressive=True from scraper.py because telethon have removed this argument.

jakbin avatar Dec 30 '22 14:12 jakbin

Fixed in 6d67b43

AbirHasan2005 avatar Jan 02 '23 12:01 AbirHasan2005