[danbooru] add tests for booruvar

pull/4403/head
Mike Fährmann 1 year ago
parent 822a77d846
commit 63326e3168
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1019,6 +1019,12 @@ Consider all sites to be NSFW unless otherwise known.
<td>Pools, Popular Images, Posts, Tag Searches</td> <td>Pools, Popular Images, Posts, Tag Searches</td>
<td>Supported</td> <td>Supported</td>
</tr> </tr>
<tr>
<td>Booruvar</td>
<td>https://booru.borvar.art/</td>
<td>Pools, Popular Images, Posts, Tag Searches</td>
<td></td>
</tr>
<tr> <tr>
<td colspan="4"><strong>e621 Instances</strong></td> <td colspan="4"><strong>e621 Instances</strong></td>

@ -163,7 +163,7 @@ BASE_PATTERN = DanbooruExtractor.update({
}, },
"booruvar": { "booruvar": {
"root": "https://booru.borvar.art", "root": "https://booru.borvar.art",
"pattern": r"booru\.borvar\.art" "pattern": r"booru\.borvar\.art",
}, },
}) })
@ -196,6 +196,11 @@ class DanbooruTagExtractor(DanbooruExtractor):
r"/[0-9a-f]{2}/[0-9a-f]{2}/[0-9a-f]{32}\.\w+", r"/[0-9a-f]{2}/[0-9a-f]{2}/[0-9a-f]{32}\.\w+",
"count": ">= 3", "count": ">= 3",
}), }),
("https://booru.borvar.art/posts?tags=chibi&z=1", {
"pattern": r"https://booru\.borvar\.art/data/original"
r"/[0-9a-f]{2}/[0-9a-f]{2}/[0-9a-f]{32}\.\w+",
"count": ">= 3",
}),
("https://hijiribe.donmai.us/posts?tags=bonocho"), ("https://hijiribe.donmai.us/posts?tags=bonocho"),
("https://sonohara.donmai.us/posts?tags=bonocho"), ("https://sonohara.donmai.us/posts?tags=bonocho"),
("https://safebooru.donmai.us/posts?tags=bonocho"), ("https://safebooru.donmai.us/posts?tags=bonocho"),
@ -242,6 +247,10 @@ class DanbooruPoolExtractor(DanbooruExtractor):
"url": "902549ffcdb00fe033c3f63e12bc3cb95c5fd8d5", "url": "902549ffcdb00fe033c3f63e12bc3cb95c5fd8d5",
"count": 6, "count": 6,
}), }),
("https://booru.borvar.art/pools/2", {
"url": "77fa3559a3fc919f72611f4e3dd0f919d19d3e0d",
"count": 4,
}),
("https://aibooru.online/pools/1"), ("https://aibooru.online/pools/1"),
("https://danbooru.donmai.us/pool/show/7659"), ("https://danbooru.donmai.us/pool/show/7659"),
) )
@ -282,6 +291,9 @@ class DanbooruPostExtractor(DanbooruExtractor):
("https://aibooru.online/posts/1", { ("https://aibooru.online/posts/1", {
"content": "54d548743cd67799a62c77cbae97cfa0fec1b7e9", "content": "54d548743cd67799a62c77cbae97cfa0fec1b7e9",
}), }),
("https://booru.borvar.art/posts/1487", {
"content": "91273ac1ea413a12be468841e2b5804656a50bff",
}),
("https://danbooru.donmai.us/post/show/294929"), ("https://danbooru.donmai.us/post/show/294929"),
) )
@ -313,6 +325,7 @@ class DanbooruPopularExtractor(DanbooruExtractor):
}), }),
("https://booru.allthefallen.moe/explore/posts/popular"), ("https://booru.allthefallen.moe/explore/posts/popular"),
("https://aibooru.online/explore/posts/popular"), ("https://aibooru.online/explore/posts/popular"),
("https://booru.borvar.art/explore/posts/popular"),
) )
def __init__(self, match): def __init__(self, match):

@ -322,7 +322,8 @@ def setup_test_config():
config.set(("extractor", "mangoxo") , "username", "LiQiang3") config.set(("extractor", "mangoxo") , "username", "LiQiang3")
config.set(("extractor", "mangoxo") , "password", "5zbQF10_5u25259Ma") config.set(("extractor", "mangoxo") , "password", "5zbQF10_5u25259Ma")
for category in ("danbooru", "atfbooru", "aibooru", "e621", "e926", for category in ("danbooru", "atfbooru", "aibooru", "booruvar",
"e621", "e926",
"instagram", "twitter", "subscribestar", "deviantart", "instagram", "twitter", "subscribestar", "deviantart",
"inkbunny", "tapas", "pillowfort", "mangadex"): "inkbunny", "tapas", "pillowfort", "mangadex"):
config.set(("extractor", category), "username", None) config.set(("extractor", category), "username", None)

Loading…
Cancel
Save