This commit is contained in:
Kovid Goyal 2013-11-10 07:30:48 +05:30
parent 91f85b8910
commit a28b690f42

View File

@ -78,7 +78,6 @@ class Article(object):
self._title = clean_ascii_chars(val)
return property(fget=fget, fset=fset)
def __repr__(self):
return \
(u'''\
@ -137,7 +136,6 @@ class Feed(object):
break
self.parse_article(item)
def populate_from_preparsed_feed(self, title, articles, oldest_article=7,
max_articles_per_feed=100):
self.title = unicode(title if title else _('Unknown feed'))
@ -176,7 +174,6 @@ class Feed(object):
d = item.get('date', '')
article.formatted_date = d
def parse_article(self, item):
self.id_counter += 1
id = item.get('id', None)
@ -219,7 +216,8 @@ class Feed(object):
self.articles.append(article)
else:
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))
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')