fix search module
parent
5423fc2edd
commit
8a33dabb3e
|
@ -20,7 +20,7 @@ class Grab(web.urllib.request.URLopener):
|
||||||
|
|
||||||
def google_ajax(query):
|
def google_ajax(query):
|
||||||
"""Search using AjaxSearch, and return its JSON."""
|
"""Search using AjaxSearch, and return its JSON."""
|
||||||
if isinstance(query, unicode):
|
if isinstance(query, str):
|
||||||
query = query.encode('utf-8')
|
query = query.encode('utf-8')
|
||||||
uri = 'http://ajax.googleapis.com/ajax/services/search/web'
|
uri = 'http://ajax.googleapis.com/ajax/services/search/web'
|
||||||
args = '?v=1.0&safe=off&q=' + web.urllib.quote(query)
|
args = '?v=1.0&safe=off&q=' + web.urllib.quote(query)
|
||||||
|
|
Loading…
Reference in New Issue