mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-20 21:53:09 +02:00
Fix #640
This commit is contained in:
parent
4fe56b1ef2
commit
4bf0845457
1 changed files with 6 additions and 1 deletions
|
|
@ -130,7 +130,12 @@ def parse_article(self, item):
|
|||
if delta.days*24*3600 + delta.seconds <= 24*3600*self.oldest_article:
|
||||
self.articles.append(article)
|
||||
else:
|
||||
self.logger.debug('Skipping article %s (%s) from feed %s as it is too old.'%(title, article.localtime.strftime('%a, %d %b, %Y %H:%M'), self.title))
|
||||
try:
|
||||
self.logger.debug('Skipping article %s (%s) from feed %s as it is too old.'%(title, article.localtime.strftime('%a, %d %b, %Y %H:%M'), self.title))
|
||||
except UnicodeDecodeError:
|
||||
if not isinstance(title, unicode):
|
||||
title = title.decode('utf-8', 'replace')
|
||||
self.logger.debug('Skipping article %s as it is too old'%title)
|
||||
|
||||
def __iter__(self):
|
||||
return iter(self.articles)
|
||||
|
|
|
|||
Loading…
Reference in a new issue