[giantessbooru] update domain

pull/5094/head
Mike Fährmann 8 months ago
parent 2007cb2f59
commit a1c1e80f67
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1395,7 +1395,7 @@ Consider all listed sites to potentially be NSFW.
</tr>
<tr>
<td>Giantessbooru</td>
<td>https://giantessbooru.com/</td>
<td>https://sizechangebooru.com/</td>
<td>Posts, Tag Searches</td>
<td></td>
</tr>

@ -75,8 +75,8 @@ BASE_PATTERN = Shimmie2Extractor.update({
"cookies": {"ui-tnc-agreed": "true"},
},
"giantessbooru": {
"root": "https://giantessbooru.com",
"pattern": r"giantessbooru\.com",
"root": "https://sizechangebooru.com",
"pattern": r"(?:sizechange|giantess)booru\.com",
"cookies": {"agreed": "true"},
},
"tentaclerape": {
@ -176,25 +176,25 @@ class Shimmie2TagExtractor(Shimmie2Extractor):
extr = text.extract_from(self.request(url).text)
while True:
pid = extr('href="./index.php?q=/post/view/', '&')
pid = extr("href='./index.php?q=/post/view/", "&")
if not pid:
break
tags, dimensions, size = extr('title="', '"').split(" // ")
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]),
"id" : pid,
"md5" : "",
"tags" : tags,
"width" : width,
"height" : height,
"size" : text.parse_bytes(size[:-1]),
}
pnum += 1
if not extr('/{}">{}<'.format(pnum, pnum), ">"):
if not extr("/{0}'>{0}<".format(pnum), ">"):
return
@ -241,7 +241,7 @@ class Shimmie2PostExtractor(Shimmie2Extractor):
"id" : self.post_id,
"tags" : extr(": ", "<").partition(" - ")[0].rstrip(")"),
"md5" : "",
"file_url": self.root + extr('id="main_image" src=".', '"'),
"file_url": self.root + extr("id='main_image' src='.", "'"),
"width" : extr("orig_width =", ";"),
"height" : 0,
"size" : 0,

@ -9,14 +9,20 @@ from gallery_dl.extractor import shimmie2
__tests__ = (
{
"#url" : "https://giantessbooru.com/index.php?q=/post/list/drawing/1",
"#url" : "https://sizechangebooru.com/index.php?q=/post/list/drawing/1",
"#category": ("shimmie2", "giantessbooru", "tag"),
"#class" : shimmie2.Shimmie2TagExtractor,
"#pattern" : r"https://giantessbooru\.com/index\.php\?q=/image/\d+\.jpg",
"#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"),
@ -24,14 +30,14 @@ __tests__ = (
},
{
"#url" : "https://giantessbooru.com/index.php?q=/post/view/41",
"#url" : "https://sizechangebooru.com/index.php?q=/post/view/41",
"#category": ("shimmie2", "giantessbooru", "post"),
"#class" : shimmie2.Shimmie2PostExtractor,
"#pattern" : r"https://giantessbooru\.com/index\.php\?q=/image/41\.jpg",
"#urls" : "https://sizechangebooru.com/index.php?q=/image/41.jpg",
"#sha1_content": "79115ed309d1f4e82e7bead6948760e889139c91",
"extension": "jpg",
"file_url" : "https://giantessbooru.com/index.php?q=/image/41.jpg",
"file_url" : "https://sizechangebooru.com/index.php?q=/image/41.jpg",
"filename" : "41",
"height" : 0,
"id" : 41,
@ -41,6 +47,12 @@ __tests__ = (
"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"),

Loading…
Cancel
Save