summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/exhentai.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:31:59 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:31:59 -0500
commit1981ccaaea6eab2cf32536ec5afe132a870914d8 (patch)
tree013f1e17d922d3a6abf7f57aa6a175c2ce5d93bc /gallery_dl/extractor/exhentai.py
parentfc004701f923bb954a22c7fec2ae8d607e78cb2b (diff)
New upstream version 1.28.0.upstream/1.28.0
Diffstat (limited to 'gallery_dl/extractor/exhentai.py')
-rw-r--r--gallery_dl/extractor/exhentai.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gallery_dl/extractor/exhentai.py b/gallery_dl/extractor/exhentai.py
index 3e6d537..e7ba78e 100644
--- a/gallery_dl/extractor/exhentai.py
+++ b/gallery_dl/extractor/exhentai.py
@@ -11,6 +11,7 @@
from .common import Extractor, Message
from .. import text, util, exception
from ..cache import cache
+import collections
import itertools
import math
@@ -227,6 +228,13 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
if self.config("metadata", False):
data.update(self.metadata_from_api())
data["date"] = text.parse_timestamp(data["posted"])
+ if self.config("tags", False):
+ tags = collections.defaultdict(list)
+ for tag in data["tags"]:
+ type, _, value = tag.partition(":")
+ tags[type].append(value)
+ for type, values in tags.items():
+ data["tags_" + type] = values
return data
def metadata_from_page(self, page):