AbirHasan2005 / TelegramScraper

Using this tool you can easily add so many members from any group to your group. Less than 2 minutes. Super easy. Time saver. But this tool is only for educational purpose. You could be banned from Telegram. So be careful. Recommanded to use this tool only on Termux.
531 stars 270 forks source link

A wait of 29 seconds is required #23

Closed ljhOfGithub closed 1 year ago

ljhOfGithub commented 2 years ago
[+] 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?

anon-user-com commented 2 years ago

Change from aggressive=true to aggressive=false

hardcore commented 2 years ago

Change from aggressive=true to aggressive=false

Thanks a lot! Helped me in this case!

anon-user-com commented 2 years ago

Change from aggressive=true to aggressive=false

Thanks a lot! Helped me in this case!

No problem. You are welcome

fluential commented 1 year ago

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

jakbin commented 1 year ago

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

AbirHasan2005 commented 1 year ago

Fixed in 6d67b43