Skip to content

ATOM feed elements whose updated date changes should be reported as changing #102

@olberger

Description

@olberger

When an atom feed element has an "updated" date which changes, it should be taken into account, in addition to the content's value, for detecting a modified element that needs to be notified.

The following provides such capacity:

diff --git a/rss2email/feed.py b/rss2email/feed.py
index a5d76ae..cb6c0f1 100644
--- a/rss2email/feed.py
+++ b/rss2email/feed.py
@@ -514,6 +514,9 @@ class Feed (object):
                 return entry.id
         content = self._get_entry_content(entry)
         content_value = content['value'].strip()
+        updated = getattr(entry, 'updated', None)
+        if updated:
+            content_value += entry.updated
         if content_value:
             return _hashlib.sha1(
                 content_value.encode('unicode-escape')).hexdigest()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions