Merge pull request #35 from AndrewKvalheim/entry-id-fallback

Stabilize entry IDs
This commit is contained in:
Tulir Asokan 2023-02-21 13:24:15 +02:00 committed by GitHub
commit b58202ebfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,12 +280,12 @@ class RSSBot(Plugin):
feed_id=feed_id,
id=(
getattr(entry, "id", None)
or getattr(entry, "link", None)
or hashlib.sha1(
" ".join(
[
getattr(entry, "title", ""),
getattr(entry, "description", ""),
getattr(entry, "link", ""),
]
).encode("utf-8")
).hexdigest()