diff --git a/docs/supportedsites.md b/docs/supportedsites.md index 740f4e92..cbcf4320 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -1543,12 +1543,6 @@ Consider all listed sites to potentially be NSFW. Shimmie2 Instances - - Giantessbooru - https://sizechangebooru.com/ - Posts, Tag Searches - - Cavemanon https://booru.cavemanon.xyz/ diff --git a/gallery_dl/extractor/shimmie2.py b/gallery_dl/extractor/shimmie2.py index 82493421..b9886467 100644 --- a/gallery_dl/extractor/shimmie2.py +++ b/gallery_dl/extractor/shimmie2.py @@ -26,9 +26,6 @@ class Shimmie2Extractor(BaseExtractor): if file_url := self.config_instance("file_url"): self.file_url_fmt = file_url - if self.category == "giantessbooru": - self.posts = self._posts_giantessbooru - def items(self): data = self.metadata() @@ -67,11 +64,6 @@ class Shimmie2Extractor(BaseExtractor): BASE_PATTERN = Shimmie2Extractor.update({ - "giantessbooru": { - "root": "https://sizechangebooru.com", - "pattern": r"(?:sizechange|giantess)booru\.com", - "cookies": {"agreed": "true"}, - }, "cavemanon": { "root": "https://booru.cavemanon.xyz", "pattern": r"booru\.cavemanon\.xyz", @@ -159,36 +151,6 @@ class Shimmie2TagExtractor(Shimmie2Extractor): if not extr(f"/{pnum}'>{pnum}<", ">"): return - def _posts_giantessbooru(self): - pnum = text.parse_int(self.groups[-1], 1) - file_url_fmt = (self.root + "/index.php?q=/image/{}.jpg").format - - while True: - url = f"{self.root}/index.php?q=/post/list/{self.tags}/{pnum}" - extr = text.extract_from(self.request(url).text) - - while True: - pid = extr("href='./index.php?q=/post/view/", "&") - if not pid: - break - - tags, dimensions, size = extr("title='", "'").split(" // ") - width, _, height = dimensions.partition("x") - - yield { - "file_url": file_url_fmt(pid), - "id" : pid, - "md5" : "", - "tags" : tags, - "width" : width, - "height" : height, - "size" : text.parse_bytes(size[:-1]), - } - - pnum += 1 - if not extr(f"/{pnum}'>{pnum}<", ">"): - return - class Shimmie2PostExtractor(Shimmie2Extractor): """Extractor for single shimmie2 posts""" @@ -221,18 +183,3 @@ class Shimmie2PostExtractor(Shimmie2Extractor): post["md5"] = text.extr(post["file_url"], "/_images/", "/") return (post,) - - def _posts_giantessbooru(self): - post_id = self.groups[-1] - url = f"{self.root}/index.php?q=/post/view/{post_id}" - extr = text.extract_from(self.request(url).text) - - return ({ - "id" : post_id, - "tags" : extr(": ", "<").partition(" - ")[0].rstrip(")"), - "md5" : "", - "file_url": self.root + extr("id='main_image' src='.", "'"), - "width" : extr("orig_width =", ";"), - "height" : 0, - "size" : 0, - },) diff --git a/test/results/giantessbooru.py b/test/results/giantessbooru.py deleted file mode 100644 index b28b13c4..00000000 --- a/test/results/giantessbooru.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. - -from gallery_dl.extractor import shimmie2 - - -__tests__ = ( -{ - "#url" : "https://sizechangebooru.com/index.php?q=/post/list/drawing/1", - "#category": ("shimmie2", "giantessbooru", "tag"), - "#class" : shimmie2.Shimmie2TagExtractor, - "#pattern" : r"https://sizechangebooru\.com/index\.php\?q=/image/\d+\.jpg", - "#range" : "1-100", - "#count" : 100, -}, - -{ - "#url" : "https://giantessbooru.com/index.php?q=/post/list/drawing/1", - "#category": ("shimmie2", "giantessbooru", "tag"), - "#class" : shimmie2.Shimmie2TagExtractor, -}, - -{ - "#url" : "https://giantessbooru.com/post/list/drawing/1", - "#category": ("shimmie2", "giantessbooru", "tag"), - "#class" : shimmie2.Shimmie2TagExtractor, -}, - -{ - "#url" : "https://sizechangebooru.com/index.php?q=/post/view/41", - "#category": ("shimmie2", "giantessbooru", "post"), - "#class" : shimmie2.Shimmie2PostExtractor, - "#results" : "https://sizechangebooru.com/index.php?q=/image/41.jpg", - "#sha1_content": "79115ed309d1f4e82e7bead6948760e889139c91", - - "extension": "jpg", - "file_url" : "https://sizechangebooru.com/index.php?q=/image/41.jpg", - "filename" : "41", - "height" : 0, - "id" : 41, - "md5" : "", - "size" : 0, - "tags" : "anime bare_midriff color drawing gentle giantess karbo looking_at_tinies negeyari outdoors smiling snake_girl white_hair", - "width" : 1387, -}, - -{ - "#url" : "https://giantessbooru.com/index.php?q=/post/view/41", - "#category": ("shimmie2", "giantessbooru", "post"), - "#class" : shimmie2.Shimmie2PostExtractor, -}, - -{ - "#url" : "https://giantessbooru.com/post/view/41", - "#category": ("shimmie2", "giantessbooru", "post"), - "#class" : shimmie2.Shimmie2PostExtractor, -}, - -)