From 5cfdd0e41c24d9d40263e53c83748fc8f094d670 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Sat, 1 Jan 2011 12:18:47 -0500 Subject: [PATCH] ddg: Add link to results page --- modules/ddg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ddg.py b/modules/ddg.py index e06e6cc..25ceb5b 100755 --- a/modules/ddg.py +++ b/modules/ddg.py @@ -34,10 +34,11 @@ def ddg(phenny, input, celsius=False): return phenny.reply(".ddg what?") uri = result(query) + resultsuri = "https://duckduckgo.com/?q=" + web.urllib.quote(query.encode('utf-8')) if uri: - phenny.reply("%s - Results from https://duckduckgo.com/" % uri) + phenny.reply("%s - Results from %s" % (uri, resultsuri)) else: - phenny.reply("No results found for '%s'." % query) + phenny.reply("No results found for '%s'; try %s" % (query, resultsuri)) ddg.rule = (['ddg'], r'(.*)') if __name__ == '__main__':