1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[warosu] fix extraction

This commit is contained in:
Mike Fährmann 2024-07-26 21:09:07 +02:00
parent d7a2c73274
commit 0fcd603498
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -64,7 +64,7 @@ class WarosuThreadExtractor(Extractor):
def parse(self, post):
"""Build post object by extracting data from an HTML post"""
data = self._extract_post(post)
if "<span> File:" in post and self._extract_image(post, data):
if "<span class=fileinfo>" in post and self._extract_image(post, data):
part = data["image"].rpartition("/")[2]
data["tim"], _, data["extension"] = part.partition(".")
data["ext"] = "." + data["extension"]
@ -83,7 +83,7 @@ class WarosuThreadExtractor(Extractor):
def _extract_image(self, post, data):
extr = text.extract_from(post)
data["fsize"] = extr("<span> File: ", ", ")
data["fsize"] = extr("<span class=fileinfo> File: ", ", ")
data["w"] = extr("", "x")
data["h"] = extr("", ", ")
data["filename"] = text.unquote(extr(