fix search module

master
mutantmonkey 2012-02-10 21:11:04 -05:00
parent 5423fc2edd
commit 8a33dabb3e
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class Grab(web.urllib.request.URLopener):
def google_ajax(query):
"""Search using AjaxSearch, and return its JSON."""
if isinstance(query, unicode):
if isinstance(query, str):
query = query.encode('utf-8')
uri = 'http://ajax.googleapis.com/ajax/services/search/web'
args = '?v=1.0&safe=off&q=' + web.urllib.quote(query)