diff --git a/modules/search.py b/modules/search.py index ef280ca..47b5c85 100755 --- a/modules/search.py +++ b/modules/search.py @@ -21,11 +21,11 @@ class Grab(web.urllib.request.URLopener): def google_ajax(query): """Search using AjaxSearch, and return its JSON.""" uri = 'http://ajax.googleapis.com/ajax/services/search/web' - args = '?v=1.0&safe=off&q=' + web.urllib.quote(query) - handler = web.urllib._urlopener - web.urllib._urlopener = Grab() + args = '?v=1.0&safe=off&q=' + web.quote(query) + handler = web.urllib.request._urlopener + web.urllib.request._urlopener = Grab() bytes = web.get(uri + args) - web.urllib._urlopener = handler + web.urllib.request._urlopener = handler return web.json(bytes) def google_search(query): @@ -106,7 +106,7 @@ gcs.commands = ['gcs', 'comp'] r_bing = re.compile(r'