From 2472d0722a17f46557dcf835ef5e51aeecc4e194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 29 Oct 2015 17:53:29 +0100 Subject: [PATCH] [hitomi] more metadata --- gallery_dl/extractor/hitomi.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/hitomi.py b/gallery_dl/extractor/hitomi.py index 1a1ce3a0..d5eab4ce 100644 --- a/gallery_dl/extractor/hitomi.py +++ b/gallery_dl/extractor/hitomi.py @@ -11,6 +11,7 @@ from .common import Extractor, Message from .. import text import os.path +import string info = { "category": "hitomi", @@ -44,15 +45,33 @@ class HitomiExtractor(Extractor): def get_job_metadata(self, page): """Collect metadata for extractor-job""" + group = "" + gtype = "" + series = "" _ , pos = text.extract(page, '

', "

", pos) + title , pos = text.extract(page, '.html">', "", pos) _ , pos = text.extract(page, '
  • ', '', pos) + artist, pos = text.extract(page, '.html">', '', pos) + test , pos = text.extract(page, '
  • ', '', pos) + test , pos = text.extract(page, '', '', pos) + _ , pos = text.extract(page, '', '', pos) + lang , pos = text.extract(page, '.html">', '', pos) + test , pos = text.extract(page, '', '', pos) return { "category": info["category"], "gallery-id": self.gid, "title": title, - "artist": artist, + "artist": string.capwords(artist), + "group": string.capwords(group), + "type": gtype[1:-1].capitalize(), + "lang": lang.capitalize(), + "series": string.capwords(series), } @staticmethod