diff --git a/docs/configuration.rst b/docs/configuration.rst index 2acdebed..d908118f 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -621,6 +621,8 @@ extractor.3dbooru.tags ---------------------- extractor.e621.tags ------------------- +extractor.gelbooru.tags +----------------------- extractor.konachan.tags ----------------------- extractor.rule34.tags diff --git a/gallery_dl/extractor/booru.py b/gallery_dl/extractor/booru.py index 362c1a39..3c211564 100644 --- a/gallery_dl/extractor/booru.py +++ b/gallery_dl/extractor/booru.py @@ -31,10 +31,7 @@ class BooruExtractor(SharedConfigExtractor): def __init__(self, match): super().__init__() self.params = {} - self.prepare = None - - if self.post_url and self.config("tags", False): - self.prepare = self._extended_tags + self.extags = self.post_url and self.config("tags", False) def skip(self, num): pages = num // self.per_page @@ -62,8 +59,8 @@ class BooruExtractor(SharedConfigExtractor): if url.startswith("/"): url = text.urljoin(self.api_url, url) image.update(data) - if self.prepare: - self.prepare(image) + if self.extags: + self.extended_tags(image) yield Message.Url, url, text.nameext_from_url(url, image) if len(images) < self.per_page: @@ -89,17 +86,16 @@ class BooruExtractor(SharedConfigExtractor): """Collect metadata for extractor-job""" return {} - def _extended_tags(self, image): + def extended_tags(self, image, page=None): """Rerieve extended tag information""" - url = self.post_url.format(image["id"]) - page = self.request(url).text - tag_html = text.extract(page, '