mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix encoding bug when using full content feeds
This commit is contained in:
parent
8b17b20066
commit
3b6b27c3c4
@ -151,7 +151,10 @@ class Feed(object):
|
|||||||
link = None
|
link = None
|
||||||
description = item.get('summary', None)
|
description = item.get('summary', None)
|
||||||
|
|
||||||
content = '\n'.join(i.value for i in item.get('content', []))
|
content = [i.value for i in item.get('content', []) if i.value]
|
||||||
|
content = [i if isinstance(i, unicode) else i.decode('utf-8', 'replace')
|
||||||
|
for i in content]
|
||||||
|
content = u'\n'.join(content)
|
||||||
if not content.strip():
|
if not content.strip():
|
||||||
content = None
|
content = None
|
||||||
if not link and not content:
|
if not link and not content:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user