Add a note to PLUGINS about making sure plugin storage gets saved.
+Use updated_parsed instead of the obsolete modified_parsed when
+extracting the feed-provided date for an item, and fall back to
+published_parsed and then created_parsed if it doesn't exist.
+(feedparser currently does fallback automatically, but it's scheduled to
+be removed at some point, so it's better for rawdog to do it.)
+
- rawdog 2.13
Forcibly disable BeautifulSoup support in feedparser, since it returns
# rawdog: RSS aggregator without delusions of grandeur.
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Adam Sampson <ats@offog.org>
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Adam Sampson <ats@offog.org>
#
# rawdog is free software; you can redistribute and/or modify it
# under the terms of that license as published by the Free Software
self.entry_info = entry_info
self.sequence = sequence
- modified = entry_info.get("modified_parsed")
self.date = None
- if modified is not None:
+ parsed = entry_info.get("updated_parsed")
+ if parsed is None:
+ parsed = entry_info.get("published_parsed")
+ if parsed is None:
+ parsed = entry_info.get("created_parsed")
+ if parsed is not None:
try:
- self.date = calendar.timegm(modified)
+ self.date = calendar.timegm(parsed)
except OverflowError:
pass