News download: Fix a regression in 0.9.23 that prevented oldest_article from working with some RSS feeds.

This commit is contained in:
Kovid Goyal 2013-03-18 11:18:16 +05:30
parent 06844b8e1a
commit f5849facca

View File

@ -184,7 +184,12 @@ class Feed(object):
id = 'internal id#%s'%self.id_counter
if id in self.added_articles:
return
published = item.get('date_parsed', time.gmtime())
published = None
for date_field in ('date_parsed', 'published_parsed',
'updated_parsed'):
published = item.get(date_field, None)
if published is not None:
break
if not published:
published = time.gmtime()
self.added_articles.append(id)