DuckDuckGo support, and minor wa and wik fixes.

This commit is contained in:
Sean B. Palmer
2011-08-04 15:53:55 +01:00
parent c493e7ca07
commit 66edd83372
3 changed files with 21 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ def wa(phenny, input):
return phenny.reply("No search term.")
query = input.group(2).encode('utf-8')
uri = 'http://tumbolia.appspot.com/wa/'
answer = web.get(uri + web.urllib.quote(query))
answer = web.get(uri + web.urllib.quote(query.replace('+', '%2B')))
if answer:
phenny.say(answer)
else: phenny.reply('Sorry, no result.')