From 80ba60d2958ebdb6716ff201840f4250a32fd63e Mon Sep 17 00:00:00 2001 From: pictuga Date: Fri, 19 Apr 2013 11:42:54 +0200 Subject: [PATCH] Better detection of feeds with content provided. --- morss.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/morss.py b/morss.py index 9897663..17e6207 100644 --- a/morss.py +++ b/morss.py @@ -251,7 +251,10 @@ def Fill(rss, cache): # content already provided? if 'content' in item: - if len(item.content) > 4*len(item.desc): + content_len = len(lxml.html.fromstring(item.content).text_content()) + log('content: %s vs %s' % (content_len, len(item.desc))) + if content_len > 5*len(item.desc): + log('provided') return item # check link