[exhentai] fix extraction for disowned galleries (closes #2055)

This commit is contained in:
Mike Fährmann
2021-11-24 21:26:16 +01:00
parent 612850438e
commit f2ae179713

View File

@@ -239,7 +239,7 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
"title_jpn" : text.unescape(extr('<h1 id="gj">', '</h1>')),
"_" : extr('<div id="gdc"><div class="cs ct', '"'),
"eh_category" : extr('>', '<'),
"uploader" : text.unquote(extr('/uploader/', '"')),
"uploader" : extr('<div id="gdn">', '</div>'),
"date" : text.parse_datetime(extr(
'>Posted:</td><td class="gdt2">', '</td>'), "%Y-%m-%d %H:%M"),
"parent" : extr(
@@ -255,6 +255,10 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
"torrentcount" : extr('>Torrent Download (', ')'),
}
if data["uploader"].startswith("<"):
data["uploader"] = text.unescape(text.extract(
data["uploader"], ">", "<")[0])
f = data["favorites"][0]
if f == "N":
data["favorites"] = "0"