【问题标题】:How to get popular tweets from a user with tweepy?如何使用 tweepy 从用户那里获取热门推文?
【发布时间】:2016-03-16 19:56:04
【问题描述】:

我正在尝试使用 tweepy 从特定用户那里获取热门推文。我需要来自 twitter API (https://dev.twitter.com/rest/reference/get/search/tweets) 的 result_type = 'popular' 之类的东西。

我该怎么做?

【问题讨论】:

    标签: python tweepy


    【解决方案1】:

    使用 Python,试试这个来获得 5 条带有标签 #yoursearch 的流行推文:

    for tweet in tweepy.Cursor(api.search, q='#yoursearch',result_type='popular').items(5):
        print(tweet)
    

    【讨论】:

    • 很遗憾,这不适用于特定用户
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-27
    • 2016-01-07
    相关资源
    最近更新 更多