Search code examples
pythontelegramtelethon

Unable to get complete participant list: get_participants in Telethon


get_participants is only giving a few participants but not the complete group of participants. It was working fine a few weeks back but not working as of now. Am I missing anything here?

    target_group=self.groups[int(g_index)]

    print('Fetching Members...')
    all_participants = []

    all_participants = self.client.get_participants(target_group, aggressive=True)

Solution

  • This was because of the new feature in telegram i.e. (Hide members), If members are hidden in that case only the user with the admin role is visible. However, I was able to scrape users with the help of message iteration where only users who have messaged were extracted.