diff --git a/gallery_dl/extractor/hentainexus.py b/gallery_dl/extractor/hentainexus.py
index ad97eba441..1d44e9b69c 100644
--- a/gallery_dl/extractor/hentainexus.py
+++ b/gallery_dl/extractor/hentainexus.py
@@ -42,6 +42,8 @@ def metadata(self, page):
"title" : extr('
', '
'),
"artist" : rmve(extr('viewcolumn">Artist' , '')),
"book" : rmve(extr('viewcolumn">Book' , '')),
+ "circle" : rmve(extr('viewcolumn">Circle' , '')),
+ "event" : rmve(extr('viewcolumn">Event' , '')),
"language" : rmve(extr('viewcolumn">Language' , '')),
"magazine" : rmve(extr('viewcolumn">Magazine' , '')),
"parody" : rmve(extr('viewcolumn">Parody' , '')),
@@ -49,8 +51,30 @@ def metadata(self, page):
"description": rmve(extr('viewcolumn">Description', '')),
}
data["lang"] = util.language_to_code(data["language"])
+ data["type"] = "Doujinshi" if 'doujin' in data["tags"] else "Manga"
+ data["title_conventional"] = self.join_title(
+ data["event"], data["circle"], data["artist"], data["title"], data["parody"], data["book"], data["magazine"]
+ )
return data
+ @staticmethod
+ def join_title(event, circle, artist, title, parody, book, magazine):
+ jt = ''
+ if event:
+ jt += '({}) '.format(event)
+ if circle:
+ jt += '[{} ({})] '.format(circle, artist)
+ else:
+ jt += '[{}] '.format(artist)
+ jt += title
+ if parody.lower() != 'original work':
+ jt += ' ({})'.format(parody)
+ if book:
+ jt += ' ({})'.format(book)
+ if magazine:
+ jt += ' ({})'.format(magazine)
+ return jt
+
def images(self, page):
url = "{}/read/{}".format(self.root, self.gallery_id)
extr = text.extract_from(self.request(url).text)