mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing broken content from RSS feed when summary is actually longer.
This commit is contained in:
parent
96f1de7b58
commit
4386b14beb
1 changed files with 7 additions and 2 deletions
|
@ -98,10 +98,15 @@ def pre_process_story(entry):
|
|||
entry['guid'] = unicode(entry['guid'])
|
||||
|
||||
# Normalize story content/summary
|
||||
summary = entry.get('summary', '')
|
||||
content = ""
|
||||
if not summary and 'summary_detail' in entry:
|
||||
summary = entry['summary_detail'].get('value', '')
|
||||
if entry.get('content'):
|
||||
entry['story_content'] = entry['content'][0].get('value', '').strip()
|
||||
content = entry['content'][0].get('value', '')
|
||||
if len(content) > len(summary):
|
||||
entry['story_content'] = content.strip()
|
||||
else:
|
||||
summary = entry.get('summary') or ''
|
||||
entry['story_content'] = summary.strip()
|
||||
|
||||
# Add each media enclosure as a Download link
|
||||
|
|
Loading…
Add table
Reference in a new issue