Fix support for RSS feeds without content attribute

This commit is contained in:
A git user 2023-08-17 12:28:46 +02:00
parent 4dfa74a63b
commit e0a992396e
No known key found for this signature in database
GPG Key ID: 7920D03B7AA7CD7B

View File

@ -296,7 +296,9 @@ class RSSBot(Plugin):
title=getattr(entry, "title", ""),
summary=getattr(entry, "description", "").strip(),
link=getattr(entry, "link", ""),
content=entry["content"][0]["value"].strip(),
content=entry["content"][0]["value"].strip() if hasattr(entry, "content")
and len(entry["content"]) > 0
and hasattr(entry["content"][0], "value") else "",
)
@staticmethod