Merge pull request #83 from Voulnet/patch-2

I fixed line 479 to properly URL encode the querystring (q parameter) fo...
This commit is contained in:
Ryan McGrath 2012-04-19 15:28:21 -07:00
commit 6ebf6df884

View file

@ -479,7 +479,7 @@ class Twython(object):
e.g x.searchGen("python", page="2") or
x.searchGen(search_query = "python", page = "2")
"""
searchURL = Twython.constructApiURL("http://search.twitter.com/search.json?q=%s" % Twython.unicode2utf8(search_query), kwargs)
searchURL = Twython.constructApiURL("http://search.twitter.com/search.json?q=%s" % urllib.quote_plus(Twython.unicode2utf8(search_query)), kwargs)
try:
response = self.client.get(searchURL, headers=self.headers)
data = simplejson.loads(response.content.decode('utf-8'))