diff options
author | cedricbonhomme <devnull@localhost> | 2010-02-15 17:31:27 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-02-15 17:31:27 +0100 |
commit | 736698cbfce6d7e3d7dcba0fe7dfc356cb242d09 (patch) | |
tree | df4996c193bf50947a807b700907ad6473a09b6f /pyAggr3g470r.py | |
parent | Release 0.7. It is now possible to search for an article (description) with a... (diff) | |
download | newspipe-736698cbfce6d7e3d7dcba0fe7dfc356cb242d09.tar.gz newspipe-736698cbfce6d7e3d7dcba0fe7dfc356cb242d09.tar.bz2 newspipe-736698cbfce6d7e3d7dcba0fe7dfc356cb242d09.zip |
Searches are now done in title and description of articles.
Diffstat (limited to 'pyAggr3g470r.py')
-rw-r--r-- | pyAggr3g470r.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 += """</div> <div class="left inner">""" @@ -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 = "<b>" @@ -140,7 +139,8 @@ class Root: " - " + not_read_begin + \ """<a href="/description/%s" rel="noreferrer" target="_blank">%s</a>""" % \ (article[0].encode('utf-8'), article[2].encode('utf-8')) + \ - not_read_end + "<br />\n" + not_read_end + """ from <i><a href="%s">%s</a></i><br />\n""" % \ + (article[6].encode('utf-8'), article[5].encode('utf-8')) html += "<hr />" html += htmlfooter return html |