mirror of
https://github.com/maubot/rss.git
synced 2025-07-26 00:25:36 -04:00
Merge pull request #35 from AndrewKvalheim/entry-id-fallback
Stabilize entry IDs
This commit is contained in:
commit
b58202ebfb
1 changed files with 1 additions and 1 deletions
|
@ -280,12 +280,12 @@ class RSSBot(Plugin):
|
||||||
feed_id=feed_id,
|
feed_id=feed_id,
|
||||||
id=(
|
id=(
|
||||||
getattr(entry, "id", None)
|
getattr(entry, "id", None)
|
||||||
|
or getattr(entry, "link", None)
|
||||||
or hashlib.sha1(
|
or hashlib.sha1(
|
||||||
" ".join(
|
" ".join(
|
||||||
[
|
[
|
||||||
getattr(entry, "title", ""),
|
getattr(entry, "title", ""),
|
||||||
getattr(entry, "description", ""),
|
getattr(entry, "description", ""),
|
||||||
getattr(entry, "link", ""),
|
|
||||||
]
|
]
|
||||||
).encode("utf-8")
|
).encode("utf-8")
|
||||||
).hexdigest()
|
).hexdigest()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue