From 40602069eb96fc69fee4a93d80a41f0d920868c9 Mon Sep 17 00:00:00 2001 From: hillerliao Date: Mon, 20 Jun 2022 22:52:53 +0800 Subject: [PATCH] get item title as summary if summary does not exit --- rsshub/spiders/rssfilter/filter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsshub/spiders/rssfilter/filter.py b/rsshub/spiders/rssfilter/filter.py index c881328..07118e6 100644 --- a/rsshub/spiders/rssfilter/filter.py +++ b/rsshub/spiders/rssfilter/filter.py @@ -7,9 +7,9 @@ from rsshub.utils import DEFAULT_HEADERS def parse(post): item = {} item['title'] = post.title - item['description'] = post.summary + item['description'] = post.summary if hasattr(post,'summary') else post.title item['pubDate'] = post.published if post.has_key('published') else arrow.now().isoformat() - item['link'] = post.link + item['link'] = post.link if hasattr(post,'link') else '' item['author'] = post.author if post.has_key('author') else '' return item