Some sundry fixes and improvements to the modules.
This commit is contained in:
3
modules/wikipedia.py
Normal file → Executable file
3
modules/wikipedia.py
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user