From fdf53d578f46c61bd524a932392a0d0fec735cf6 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Fri, 10 Feb 2012 21:13:43 -0500 Subject: [PATCH] actually fix search module --- modules/search.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/search.py b/modules/search.py index 39b136d..88fdff4 100644 --- a/modules/search.py +++ b/modules/search.py @@ -23,11 +23,11 @@ def google_ajax(query): 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) - 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):