Some sundry fixes and improvements to the modules.

This commit is contained in:
Sean B. Palmer
2008-03-01 21:07:23 +00:00
parent 3d920f4317
commit 1078791cb6
17 changed files with 9 additions and 5 deletions

3
modules/wikipedia.py Normal file → Executable file
View File

@@ -49,7 +49,8 @@ def search(term):
return term
term = term.replace('_', ' ')
uri = google.google('site:en.wikipedia.org %s' % term)
try: uri = google.google('site:en.wikipedia.org %s' % term)
except IndexError: return term
if uri:
return uri[len('http://en.wikipedia.org/wiki/'):]
else: return term