'Telethon give an error when scrap group more than 6K member ('ChannelParticipants' object is not subscriptable)

Telethon give an error when scrap group more than 6K member ('ChannelParticipants' object is not subscriptable)

all_participants = []
all_participants = client.get_participants(target_group, aggressive=False)

I also set aggressive=False, but when I scrap group more than 6k members, it gives me an error.

so is there any way to set a limit on member scrap on Big group so it will only scrap 5k to 6k member and it saves after scrap 5k member and does not receive the error



Solution 1:[1]

you can use limit parameter in

client.get_participants(target_group, aggressive=False,limit=4000)

it will work

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Suraj Rao