According to the twitter search api, your allowed to omit the term (variable
'q') if you are using a geocode, but the GetSearch function doesn't support
omitting the term.
Minor tweaks fix this, bellow is the output of hg diff:
diff --git a/twitter.py b/twitter.py
--- a/twitter.py
+++ b/twitter.py
@@ -1857,7 +1857,7 @@
return results
def GetSearch(self,
- term,
+ term=None,
geocode=None,
since_id=None,
per_page=15,
@@ -1899,10 +1899,15 @@
if since_id:
parameters['since_id'] = since_id
- if not term:
+ if term is None and geocode is None:
return []
- parameters['q'] = urllib.quote_plus(term)
+ # if not term:
+ # return []
+
+ if term is not None:
+ parameters['q'] = urllib.quote_plus(term)
+
parameters['show_user'] = show_user
parameters['lang'] = lang
parameters['rpp'] = per_page
Original issue reported on code.google.com by adam.a...@gmail.com on 6 Sep 2010 at 7:06
Original issue reported on code.google.com by
adam.a...@gmail.com
on 6 Sep 2010 at 7:06