if multiple content-entries exist, select the plain- or html-one according to html2textcontent variable
This commit is contained in:
parent
9bec2c48c2
commit
6db89814fa
@ -78,6 +78,11 @@ class Entry(Base):
|
||||
self.summary = entry.get('summary')
|
||||
if entry.has_key('content'):
|
||||
self.content = entry.get('content')[0].value
|
||||
for content in entry.get('content'):
|
||||
if feed.html2textcontent and content.type == 'text/plain':
|
||||
self.content = content.value
|
||||
if not feed.html2textcontent and content.type == 'text/html':
|
||||
self.content = content.value
|
||||
if entry.has_key('author'):
|
||||
self.author = entry.get('author')
|
||||
if entry.has_key('updated_parsed'):
|
||||
|
Loading…
Reference in New Issue
Block a user