mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 15:09:23 +00:00
get item title as summary if summary does not exit
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user