我正在使用此功能从 id 获取所有关注者:
def getAllFollowers(id):
followers = tweepy.Cursor(api.followers, id = id)
temp = []
for user in followers.items():
temp.append(user)
return temp
Run Code Online (Sandbox Code Playgroud)
有没有办法在没有分页的情况下获得关注者、朋友、推文等的数量??只有号码。
用户对象具有followers_count,friends_count和statuses_count这些属性。请参阅 Twitter API 文档中的示例响应:https : //dev.twitter.com/overview/api/users
此帐户当前拥有的关注者数量。在一定的胁迫条件下,该字段会暂时显示“0”。例子:
"followers_count": 21
| 归档时间: |
|
| 查看次数: |
6483 次 |
| 最近记录: |