get item title as summary if summary does not exit

This commit is contained in:
hillerliao
2022-06-20 22:52:53 +08:00
parent 8dc2e43b64
commit 40602069eb

View File

@@ -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