[zerochan] fix tag category extraction (#5874)

This commit is contained in:
Mike Fährmann
2024-07-23 09:15:16 +02:00
parent 5f6d20c595
commit ae40c61c21

View File

@@ -83,9 +83,9 @@ class ZerochanExtractor(BooruExtractor):
html = data["tags"]
tags = data["tags"] = []
for tag in html.split("<li class=")[1:]:
category = text.extr(tag, 'data-type="', '"')
category = text.extr(tag, '"', '"')
name = text.extr(tag, 'data-tag="', '"')
tags.append(category.capitalize() + ":" + name)
tags.append(category.partition(" ")[0].capitalize() + ":" + name)
return data