[shimmie2] remove 'sizechangebooru.com' (#7667)

This commit is contained in:
Mike Fährmann
2025-08-24 10:37:42 +02:00
parent bc376d8848
commit aafb53db9a
3 changed files with 0 additions and 121 deletions

View File

@@ -1543,12 +1543,6 @@ Consider all listed sites to potentially be NSFW.
<tr id="shimmie2" title="shimmie2">
<td colspan="4"><strong>Shimmie2 Instances</strong></td>
</tr>
<tr id="giantessbooru" title="giantessbooru">
<td>Giantessbooru</td>
<td>https://sizechangebooru.com/</td>
<td>Posts, Tag Searches</td>
<td></td>
</tr>
<tr id="cavemanon" title="cavemanon">
<td>Cavemanon</td>
<td>https://booru.cavemanon.xyz/</td>

View File

@@ -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,
},)

View File

@@ -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,
},
)