获取对特定tweet的回复计数

2024-04-19 08:45:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Pythontweepy库。在

我使用以下代码成功地提取了tweet的“liked”和“re tweet”计数:

# Get count of handles who are following you
def get_followers_count(handle):
    user = api.get_user(handle)
    return user.followers_count

# Get count of handles that you are following
def get_friends_count(handle):
    user = api.get_user(handle)
    return user.friends_count

# Get count of tweets for a handle
def get_status_count(handle):
    user = api.get_user(handle)
    return user.statuses_count

# Get count of tweets liked by user
def get_favourite_count(handle):
    user = api.get_user(handle)
    return user.favourits_count

但是,我找不到一个方法来获取特定tweet的回复计数。

是否可以使用tweepy或任何其他库(比如twython甚至twitter4j)获取tweet的回复数?在


Tags: ofapigetreturndefcountarehandles