From b8b12ee6c41e837c573e5f01824e3e9cc5353a89 Mon Sep 17 00:00:00 2001 From: Stefan Krulj Date: Tue, 4 Dec 2012 15:35:57 +0100 Subject: [PATCH] quoute search implemented --- modules/active/get_quote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/active/get_quote.py b/modules/active/get_quote.py index d433992..09b5246 100644 --- a/modules/active/get_quote.py +++ b/modules/active/get_quote.py @@ -88,7 +88,7 @@ def quote(msg,args): con = urllib2.urlopen( req ) data=con.read() - print "data:", args[1][0:2], args[2],url + print "data:", args[1][0:2], args[2],"->",search_results[0],url wqp=WikiQuoteParser() wqp.feed(data) #for i in wqp.quotes: @@ -98,7 +98,7 @@ def quote(msg,args): brathuhn.sendMsg(brathuhn.ROOM,'Quoting "'+ search_results[0] +'"') brathuhn.sendMsg(brathuhn.ROOM,wqp.quotes[randint(0,len(wqp.quotes)-1)],'groupchat') else: - brathuhn.sendMsg(brathuhn.ROOM,'Could not crawl quotes from "'+url+'"','groupchat') + brathuhn.sendMsg(brathuhn.ROOM,'Could not crawl quotes from > '+url+' <','groupchat') con.close() except exceptions.Exception as e: brathuhn.sendMsg(brathuhn.ROOM,"Network Error "+unicode(e),'groupchat')