Tweepy blank search
python, tweepy, twitter
Solution
`q` parameter is optional, `geocode` is too (see docs).
This works for me:
import tweepy
auth = tweepy.OAuthHandler(<consumer_key>, <consumer_secret>)
auth.set_access_token(<key>, <secret>)
api = tweepy.API(auth)
results = tweepy.api.search(geocode="38.376,-0.5,8km", rpp=1000)
for result in results:
print result.text
print result.location if hasattr(result, 'location') else "Undefined location"
Hope that helps.
Problem
I've been searching the net for an answer, but I didn't find anything for what I think might be a simple question: Is there any way to get 'blank' searches from tweepy? For example, get all tweets from location. I can't send a query with no query field: ``` query= tweepy.api.search(q="", rpp=1000) ``` It returns: tweepy.error.TweepError: You must enter a query. What I'm looking for is get this query, for example: http://search.twitter.com/search.atom?geocode=38.376,-0.5,8km Get all tweets from...