Skip to content

Commit

Permalink
[exhentai] fix extraction for disowned galleries (closes #2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Nov 24, 2021
1 parent 6128504 commit f2ae179
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gallery_dl/extractor/exhentai.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def metadata_from_page(self, page):
"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(
Expand All @@ -255,6 +255,10 @@ def metadata_from_page(self, page):
"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"
Expand Down

0 comments on commit f2ae179

Please sign in to comment.