mouses
mouses

Reputation: 69

How to get popular tweets from a user with tweepy?

I am trying to get popular tweets from a specific user with tweepy. I need something like result_type = 'popular' from the twitter API (https://dev.twitter.com/rest/reference/get/search/tweets).

How can I do that?

Upvotes: 1

Views: 2956

Answers (1)

JeffProd
JeffProd

Reputation: 3148

With Python, try this to get 5 popular tweets with tag #yoursearch :

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

Upvotes: 2

Related Questions