def google_ajax(query):
 if isinstance(query, unicode):
  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()
 bytes = web.get((uri + args))
 web.urllib._urlopener = handler
 return web.json(bytes)

def google_ajax ( query ) : if isinstance ( query , unicode ) : 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 ( ) bytes = web . get ( ( uri + args ) ) web . urllib . _urlopener = handler return web . json ( bytes )
search using ajaxsearch .