From 61a8706fed81a803bb18e581df0776f23952cd9e Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Thu, 16 Apr 2009 21:53:59 -0600 Subject: [PATCH] forgot to remove debug print statement~ --- plugins/urbandictionary.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/urbandictionary.py b/plugins/urbandictionary.py index b9bb0e1..2609e1d 100644 --- a/plugins/urbandictionary.py +++ b/plugins/urbandictionary.py @@ -1,6 +1,6 @@ -from lxml import html - +import lxml import urllib + import hook @hook.command('u') @@ -12,11 +12,9 @@ def urban(inp): url = 'http://www.urbandictionary.com/define.php?term=' + \ urllib.quote(inp.strip(), safe='') - page = html.parse(url) + page = lxml.html.parse(url) defs = page.xpath("//div[@class='definition']") - print repr(defs[0].text_content()) - if not defs: return 'no definitions found'