From 4029b6a151b2b80705f0e70489b706341e87cfb4 Mon Sep 17 00:00:00 2001 From: blizzard Date: Sun, 19 Oct 2008 02:28:05 +0000 Subject: [PATCH] 2008-10-18 Christopher Blizzard * services/command/feedparse.py (FeedUpdateDatabaseCommand.stupidEntryAlreadyThere): Since all feeds now generate display_cache data we can use it for stupid entires. Like, say, for old vimeo entries before they had a guid. git-svn-id: svn://trac.whoisi.com/whoisi/trunk@10 ae879524-a8bd-4c4c-a5ea-74d2e5fc5a2c --- ChangeLog | 7 +++++++ services/command/feedparse.py | 7 +++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fffc5e..488d244 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-18 Christopher Blizzard + + * services/command/feedparse.py (FeedUpdateDatabaseCommand.stupidEntryAlreadyThere): + Since all feeds now generate display_cache data we can use it for + stupid entires. Like, say, for old vimeo entries before they had + a guid. + 2008-10-18 Christopher Blizzard * whoisi/templates/vimeo-widget.mak: Widget to render vimeo diff --git a/services/command/feedparse.py b/services/command/feedparse.py index a81c7fc..6d3881a 100644 --- a/services/command/feedparse.py +++ b/services/command/feedparse.py @@ -320,16 +320,15 @@ class FeedUpdateDatabaseCommand(BaseCommand): if up: updated = datetime(*up) - # we don't bother checking the display cache since the feed - # sources that fill in the display cache all have ids - # assoicated with them + # Just compare everything in the entry for old_entry in results: if entry["title"] == old_entry[2] and \ entry["link"] == old_entry[3] and \ published == old_entry[6] and \ updated == old_entry[7] and \ entry["summary"] == old_entry[8] and \ - self.getBestContent(entry) == old_entry[9]: + self.getBestContent(entry) == old_entry[9] and \ + entry["display_cache"] == old_entry[10]: print(" stupid entry already in database: %s" % entry["title"]) return True -- 2.30.2