mirror of
https://github.com/DragoonAethis/itch-dl.git
synced 2025-04-14 09:51:23 +02:00
Add support for the "Category" row in infoboxes
This commit is contained in:
parent
e70520295b
commit
f709accaa5
@ -25,6 +25,7 @@ class InfoboxMetadata(TypedDict, total=False):
|
|||||||
inputs: Dict[str, str] # Links
|
inputs: Dict[str, str] # Links
|
||||||
links: Dict[str, str] # Links
|
links: Dict[str, str] # Links
|
||||||
mentions: Dict[str, str] # Links
|
mentions: Dict[str, str] # Links
|
||||||
|
category: Dict[str, str] # Links
|
||||||
|
|
||||||
|
|
||||||
def parse_date_block(td: BeautifulSoup) -> Optional[datetime]:
|
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)
|
return "links", parse_links(content)
|
||||||
elif name == "Mentions":
|
elif name == "Mentions":
|
||||||
return "mentions", parse_links(content)
|
return "mentions", parse_links(content)
|
||||||
|
elif name == "Category":
|
||||||
|
return "category", parse_links(content)
|
||||||
else:
|
else:
|
||||||
# Oops, you need to extend this with something new. Sorry.
|
# Oops, you need to extend this with something new. Sorry.
|
||||||
# Make sure to add the block name to InfoboxMetadata as well!
|
# Make sure to add the block name to InfoboxMetadata as well!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user