From d7e909a06179e61fd33b59c93fc9ba9ef7a0e2c4 Mon Sep 17 00:00:00 2001 From: "Sean B. Palmer" Date: Sun, 2 Mar 2008 14:17:07 +0000 Subject: [PATCH] Updated the Wikipedia search component. --- modules/wikipedia.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/wikipedia.py b/modules/wikipedia.py index cb9cf6b..5489872 100755 --- a/modules/wikipedia.py +++ b/modules/wikipedia.py @@ -43,13 +43,13 @@ def text(html): return unescape(html).strip() def search(term): - try: import google + try: import search except ImportError, e: print e return term term = term.replace('_', ' ') - try: uri = google.google('site:en.wikipedia.org %s' % term) + try: uri = search.result('site:en.wikipedia.org %s' % term) except IndexError: return term if uri: return uri[len('http://en.wikipedia.org/wiki/'):]