Closed Dreamsorcerer closed 2 months ago
The documentation shows entry.content being a list: https://feedparser.readthedocs.io/en/latest/common-atom-elements.html#accessing-common-entry-elements And explicitly says that it is a list:
entry.content
Because Atom entries can have more than one content element, d.entries[0].content is a list of dictionaries.
However, in reality I get a list on some feeds and a single dictionary on others.
List of dicts: https://mypy-lang.blogspot.com/feeds/posts/default Single dict: https://matrix.org/blog/feed
Expected behaviour is for the API to be consistent and always produce a list, regardless of the feed.
Nevermind, I think it was some manipulations I was doing.
The documentation shows
entry.content
being a list: https://feedparser.readthedocs.io/en/latest/common-atom-elements.html#accessing-common-entry-elements And explicitly says that it is a list:However, in reality I get a list on some feeds and a single dictionary on others.
List of dicts: https://mypy-lang.blogspot.com/feeds/posts/default Single dict: https://matrix.org/blog/feed
Expected behaviour is for the API to be consistent and always produce a list, regardless of the feed.