...
 
Commits (3)
Showing with 3 additions and 3 deletions
......@@ -284,7 +284,7 @@ class SiteWebPage (object):
def process_feed(self, cachedir, limit=None, phpuploader=None, user=None, force=False, pretend=False):
feed = feedparser.parse(self.feed_url)
# ensure in reverse chronological order (probably redundant but important for the processing)
feed.entries.sort(key=lambda x: self.get_item_date(x), reverse=True)
feed.entries.sort(key=lambda x: SitePage.get_item_date(x), reverse=True)
# print (feed.entries[0].published_parsed, "to", feed.entries[-1].published_parsed)
count = 0
# Process in CHRONOLOGICAL order... skipping elements that OLDER than / equal to feed's last updated timestamp
......@@ -296,7 +296,7 @@ class SiteWebPage (object):
use_all_entries = []
# print ("processing feed, last_updated {0}".format(self.last_updated.strftime(DATETIME_STRF)), file=sys.stderr)
for item in all_entries:
item_dt = self.get_item_date(item)
item_dt = SitePage.get_item_date(item)
if item_dt <= self.last_updated:
# print ("Skipping older item {0}".format(item.title), file=sys.stderr)
skipped += 1
......@@ -309,7 +309,7 @@ class SiteWebPage (object):
print ("No new items since feed last updated", file=sys.stderr)
for item in all_entries:
item_dt = self.get_item_date(item)
item_dt = SitePage.get_item_date(item)
sitepage = SitePage(self.wiki, item.link)
sitepage.process_feed_item(item, source=self.pagename, cachedir=cachedir, phpuploader=phpuploader, user=user, pretend=pretend)
if self.last_updated == None or item_dt > self.last_updated:
......