From 4b2a406b3545bba519d754959f2cca6857a1a3da Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Mon, 13 Dec 2010 14:26:49 +0900 Subject: [PATCH] Fix for searchTwitterGen search_query parameter, spotted (again) by Jacob Silterra --- twython/twython.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twython/twython.py b/twython/twython.py index 0c32838..53ff24a 100644 --- a/twython/twython.py +++ b/twython/twython.py @@ -268,7 +268,7 @@ class Twython(object): except HTTPError, e: raise TwythonError("getSearchTimeline() failed with a %s error code." % `e.code`, e.code) - def searchTwitterGen(self, **kwargs): + def searchTwitterGen(self, search_query, **kwargs): """searchTwitterGen(search_query, **kwargs) Returns a generator of tweets that match a specified query. @@ -278,7 +278,7 @@ class Twython(object): e.g x.searchTwitter(q="jjndf", page="2") """ - searchURL = Twython.constructApiURL("http://search.twitter.com/search.json", kwargs) + searchURL = Twython.constructApiURL("http://search.twitter.com/search.json?q=%s" % Twython.unicode2utf8(search_query), kwargs) try: resp, content = self.client.request(searchURL, "GET") data = simplejson.loads(content)