Skip to content
This repository was archived by the owner on Dec 28, 2021. It is now read-only.

Commit c7c5aab

Browse files
committed
Fix for invalid category in blog object
1 parent 2f3681c commit c7c5aab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

callofduty/feed.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ def __init__(self, client, data: dict):
167167
self.title: str = data.pop("title")
168168
self.subtitle: Optional[str] = data.pop("subTitle", None)
169169
self.html: Optional[str] = data.pop("html", None)
170-
self.text: Optional[str] = StripHTML(
171-
self.html
172-
) if self.html is not None else None
170+
self.text: Optional[str] = (
171+
StripHTML(self.html) if self.html is not None else None
172+
)
173173
self.url: str = data.pop("url")
174174
self.thumbnail: str = data.pop("dimg")
175-
self.category: str = data["metadata"].pop("contentItemType")
175+
self.category: Optional[str] = data["metadata"].pop("contentItemType", None)
176176
self.published: datetime = datetime(
177177
data["publishedDate"].pop("year"),
178178
data["publishedDate"].pop("month"),

0 commit comments

Comments
 (0)