From 736698cbfce6d7e3d7dcba0fe7dfc356cb242d09 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Mon, 15 Feb 2010 17:31:27 +0100 Subject: Searches are now done in title and description of articles. --- pyAggr3g470r.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyAggr3g470r.py') diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 3c9a2be0..4a94def4 100644 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -117,7 +117,6 @@ class Root: in the description of the article. """ querystring = v.encode('utf-8') - print querystring html = htmlheader html += htmlnav html += """
""" @@ -126,8 +125,8 @@ class Root: for rss_feed_id in self.dic.keys(): for article in self.dic[rss_feed_id][:10]: - description = article[4].encode('utf-8') - if querystring in description: + article_content = article[4].encode('utf-8') + article[2].encode('utf-8') + if querystring.lower() in article_content.lower(): if article[7] == "0": # not readed articles are in bold not_read_begin = "" @@ -140,7 +139,8 @@ class Root: " - " + not_read_begin + \ """%s""" % \ (article[0].encode('utf-8'), article[2].encode('utf-8')) + \ - not_read_end + "
\n" + not_read_end + """ from %s
\n""" % \ + (article[6].encode('utf-8'), article[5].encode('utf-8')) html += "
" html += htmlfooter return html -- cgit