mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #640
This commit is contained in:
parent
4fe56b1ef2
commit
4bf0845457
@ -130,7 +130,12 @@ class Feed(object):
|
||||
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…
x
Reference in New Issue
Block a user