wking / rss2email

open-source tool for Windows, Mac OS and UNIX for getting news from RSS feeds in email
http://pypi.python.org/pypi/rss2email/
GNU General Public License v2.0
270 stars 48 forks source link

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

Open olberger opened 7 years ago

olberger commented 7 years ago

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()
Ekleog commented 4 years ago

Hello,

This repository has been deprecated for a few years now, and has been replaced by https://github.com/rss2email/rss2email .

If this issue is still relevant to you, and not fixed with v3.12.2, could you please reopen the issue there?

Cheers, Leo