diff --git a/docs/configuration.rst b/docs/configuration.rst index fd459293..dbfaaec1 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -2557,6 +2557,8 @@ Description Selects an alternative source to download files from. * ``"hitomi"``: Download the corresponding gallery from ``hitomi.la`` + * ``"metadata"``: Load only a gallery's metadata from the + `API `_ extractor.exhentai.tags diff --git a/gallery_dl/extractor/exhentai.py b/gallery_dl/extractor/exhentai.py index 8b997219..40695750 100644 --- a/gallery_dl/extractor/exhentai.py +++ b/gallery_dl/extractor/exhentai.py @@ -136,6 +136,8 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor): source = self.config("source") if source == "hitomi": self.items = self._items_hitomi + elif source == "metadata": + self.items = self._items_metadata limits = self.config("limits", False) if limits and limits.__class__ is int: @@ -223,6 +225,9 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor): data["_extractor"] = HitomiGalleryExtractor yield Message.Queue, url, data + def _items_metadata(self): + yield Message.Directory, self.metadata_from_api() + def get_metadata(self, page): """Extract gallery metadata""" data = self.metadata_from_page(page)