【问题标题】:How do I get the number of likes on a tweet via tweepy?如何通过 tweepy 获取推文的点赞数?
【发布时间】:2018-01-27 09:53:18
【问题描述】:

我有一个 tweepy 推文对象,我可以看到并打印它的 favorite_countretweet_count,但是当我打印对象的成员变量时我没有看到 like_count。知道收藏的数量似乎与使用推文的典型用例不太相关,因为在 Twitter 上点赞比收藏它更常见。

我可以这样做:

api = tweepy.API(auth)
tweet = api.get_status(tweet_id)
print(tweet.retweet_count)
print(tweet.favorite_count)

但是做

print(tweet.like_count)

不起作用,我看不到任何替代方法。此外,当我在谷歌上搜索“tweepy get like count of a tweet”之类的东西时,没有任何相关的弹出窗口看起来很奇怪。我该怎么做?

【问题讨论】:

    标签: python twitter tweepy


    【解决方案1】:

    收藏与喜欢相同。没有区别。在 Twitter 上点击一颗心会增加收藏次数。

    https://twittercommunity.com/t/hearts-and-likes-are-live/55642

    【讨论】:

    • 最奇怪的计数是不正确的,因为当我在 Twitter 网站上查看推文时,它们看起来与喜欢计数不同。不过转推值是正确的。
    • favourites_count 不是帖子的点赞数。这是用户集体收到的赞数。
    猜你喜欢
    • 2017-08-20
    • 2015-07-31
    • 2019-05-06
    • 2021-04-30
    • 2016-11-27
    • 1970-01-01
    • 2020-10-09
    • 2019-04-09
    • 1970-01-01
    相关资源
    最近更新 更多