[gelbooru] fix tag category extraction (#1455)

This commit is contained in:
thatfuckingbird
2021-04-10 19:05:00 +02:00
committed by GitHub
parent fe6ce5b8f8
commit 918b0441fb
2 changed files with 13 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ class GelbooruV02Extractor(booru.BooruExtractor):
self.root, post["id"])
page = self.request(url).text
html = text.extract(page, '<ul id="tag-', '</ul>')[0]
if not html:
html = text.extract(page, '<ul class="tag-', '</ul>')[0]
if html:
tags = collections.defaultdict(list)
pattern = re.compile(