Skip to content

Mastodon broken in RSSBot #836

@maxwell-kalin

Description

@maxwell-kalin

any mastodon rss feed breaks the bot

Traceback (most recent call last):
  File "/home/zulip/rss/lib/python3.11/site-packages/feedparser/util.py", line 156, in __getattr__
    return self.__getitem__(key)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/zulip/rss/lib/python3.11/site-packages/feedparser/util.py", line 113, in __getitem__
    return dict.__getitem__(self, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'title'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zulip/rss/./share/zulip/integrations/rss/rss-bot", line 245, in <module>
    response: Dict[str, Any] = send_zulip(entry, feed_name)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zulip/rss/./share/zulip/integrations/rss/rss-bot", line 180, in send_zulip
    content = f"**[{entry.title}]({entry.link})**\n{strip_tags(body)}\n{entry.link}"
                    ^^^^^^^^^^^
  File "/home/zulip/rss/lib/python3.11/site-packages/feedparser/util.py", line 158, in __getattr__
    raise AttributeError("object has no attribute '%s'" % key)
AttributeError: object has no attribute 'title'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions