From f709accaa53c63033c7b8545121400ee9bbf9081 Mon Sep 17 00:00:00 2001 From: Ryszard Knop Date: Mon, 30 May 2022 22:40:47 +0200 Subject: [PATCH] Add support for the "Category" row in infoboxes --- itch_dl/infobox.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/itch_dl/infobox.py b/itch_dl/infobox.py index 92addbc..e644e72 100644 --- a/itch_dl/infobox.py +++ b/itch_dl/infobox.py @@ -25,6 +25,7 @@ class InfoboxMetadata(TypedDict, total=False): inputs: Dict[str, str] # Links links: Dict[str, str] # Links mentions: Dict[str, str] # Links + category: Dict[str, str] # Links def parse_date_block(td: BeautifulSoup) -> Optional[datetime]: @@ -94,6 +95,8 @@ def parse_tr(name: str, content: BeautifulSoup) -> Optional[Tuple[str, Any]]: return "links", parse_links(content) elif name == "Mentions": return "mentions", parse_links(content) + elif name == "Category": + return "category", parse_links(content) else: # Oops, you need to extend this with something new. Sorry. # Make sure to add the block name to InfoboxMetadata as well!