1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 04:32:51 +01:00

[exhentai] improve 'favorites' extraction (closes #1360)

add special cases for when the favorite count is 0 (Never) or 1 (Once)
This commit is contained in:
Mike Fährmann 2021-03-07 22:31:43 +01:00
parent b6719becf1
commit 90830daf85
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -246,6 +246,12 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
"torrentcount" : extr('>Torrent Download (', ')'),
}
f = data["favorites"][0]
if f == "N":
data["favorites"] = "0"
elif f == "O":
data["favorites"] = "1"
data["lang"] = util.language_to_code(data["language"])
data["tags"] = [
text.unquote(tag.replace("+", " "))