如何使用 Tweepy(无分页)获得关注者数量?

Mc-*_*Mc- 5 tweepy

我正在使用此功能从 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)

有没有办法在没有分页的情况下获得关注者、朋友、推文等的数量??只有号码。

Sam*_*Sam 6

用户对象具有followers_count,friends_countstatuses_count这些属性。请参阅 Twitter API 文档中的示例响应:https : //dev.twitter.com/overview/api/users

此帐户当前拥有的关注者数量。在一定的胁迫条件下,该字段会暂时显示“0”。例子:

"followers_count": 21