【发布时间】:2020-10-02 21:21:56
【问题描述】:
我如何分析关注者(或关注者)列表,并计算关注者/关注者比率为
这是我用来尝试实现此目的的代码...
'''
friends = api.friends_ids(SCREEN_NAME)
count = 0
for friend in friends:
if api.get_user(id=friend).friends_count /
api.get_user(id=friend).followers_count < .2:
count += 1
print(count)
'''
我试图弄清楚列表中有多少百分比的用户拥有 5-1 的追随者与追随者的比例或更高。似乎这应该是一件容易的事,但我无法超越 API 限制。
任何帮助/建议将不胜感激。
【问题讨论】:
标签: python-3.x twitter tweepy