anonuser0428
anonuser0428

Reputation: 12343

Tweepy API search method not working

I am trying to access the search feature of the twitter api through a python wrapper for the api named tweepy. I have the following code:

import tweepy as t

auth = t.OAuthHandler(consumer_key,consumer_secret,access_token_key,access_token_secret)
api = t.API(auth)
api.search(q='#somepopularhashtag')

The output that I receive is an empty list as opposed to a list of twitter.status objects supposed to be returned. Could anyone help me out with this problem. I am using tweepy 2.0

Upvotes: 2

Views: 3716

Answers (1)

alecxe
alecxe

Reputation: 473863

The issue is not related to tweepy itself. Twitter has some problems with search API (basically it doesn't work) right now, see relevant issues and discussions:

See also relevant discussions on SO:

Plus, I'm not sure that tweepy migrated to twitter API 1.1 completely (see open issues on the project).

UPD:

Upgrade tweepy to the latest version directly from the github:

git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install

Hope that helps.

Upvotes: 3

Related Questions