From d127556c673f20809f8c923bdcf4a5a6f3a1ed9b Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Mon, 26 Dec 2011 22:19:23 -0500 Subject: [PATCH] urbandict: strip whitespace, trim at 256 chars --- modules/urbandict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/urbandict.py b/modules/urbandict.py index 5fee9de..e823b51 100644 --- a/modules/urbandict.py +++ b/modules/urbandict.py @@ -30,7 +30,7 @@ def urbandict(phenny, input): result = data['list'][0] url = 'http://www.urbandictionary.com/define.php?term={0}'.format(urlquote(word)) - response = "{0} - {1}".format(result['definition'], url) + response = "{0} - {1}".format(result['definition'].strip()[:256], url) phenny.say(response) urbandict.rule = (['urb'], r'(.*)')