Fixed the Wikipedia module's search capability.

This commit is contained in:
Sean B. Palmer
2010-04-03 11:08:03 +01:00
parent c5b234578e
commit b4c7019d53
4 changed files with 30 additions and 5 deletions

View File

@@ -126,8 +126,8 @@ def wikipedia(term, last=False):
words.pop()
sentence = ' '.join(words) + ' [...]'
if ((sentence == 'Wikipedia does not have an article with this exact name.')
or (sentence == 'Wikipedia does not have a page with this exact name.')):
if (('using the Article Wizard if you wish' in sentence)
or ('or add a request for it' in sentence)):
if not last:
term = search(term)
return wikipedia(term, last=True)