英文:
Unable to get complete participant list: get_participants in Telethon
问题
get_participants 只返回了一些参与者,而不是完整的参与者群体。几周前它还能正常工作,但现在不起作用了。我有什么遗漏吗?
target_group=self.groups[int(g_index)]
print('获取成员...')
all_participants = []
all_participants = self.client.get_participants(target_group, aggressive=True)
英文:
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)
答案1
得分: 0
这是因为 Telegram 的新功能,即(隐藏成员)。如果成员被隐藏,那么只有拥有管理员角色的用户才可见。然而,我能够通过消息迭代的方式抓取用户,只有发送消息的用户被提取出来。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论