summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/danbooru.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/danbooru.py')
-rw-r--r--gallery_dl/extractor/danbooru.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/gallery_dl/extractor/danbooru.py b/gallery_dl/extractor/danbooru.py
index c455ce1..906afda 100644
--- a/gallery_dl/extractor/danbooru.py
+++ b/gallery_dl/extractor/danbooru.py
@@ -102,6 +102,9 @@ class DanbooruExtractor(BaseExtractor):
resp = self.request(template.format(self.root, post["id"]))
post.update(resp.json())
+ if url[0] == "/":
+ url = self.root + url
+
post.update(data)
yield Message.Directory, post
yield Message.Url, url, post
@@ -170,6 +173,10 @@ INSTANCES = {
"pattern": r"booru\.allthefallen\.moe",
"page-limit": 5000,
},
+ "aibooru": {
+ "root": None,
+ "pattern": r"(?:safe.)?aibooru\.online",
+ }
}
BASE_PATTERN = DanbooruExtractor.update(INSTANCES)
@@ -202,10 +209,16 @@ class DanbooruTagExtractor(DanbooruExtractor):
("https://booru.allthefallen.moe/posts?tags=yume_shokunin", {
"count": 12,
}),
+ ("https://aibooru.online/posts?tags=center_frills&z=1", {
+ "pattern": r"https://aibooru\.online/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://sonohara.donmai.us/posts?tags=bonocho"),
("https://safebooru.donmai.us/posts?tags=bonocho"),
("https://e926.net/posts?tags=anry"),
+ ("https://safe.aibooru.online/posts?tags=center_frills"),
)
def __init__(self, match):
@@ -238,6 +251,7 @@ class DanbooruPoolExtractor(DanbooruExtractor):
"url": "902549ffcdb00fe033c3f63e12bc3cb95c5fd8d5",
"count": 6,
}),
+ ("https://aibooru.online/pools/1"),
("https://danbooru.donmai.us/pool/show/7659"),
("https://e621.net/pool/show/73"),
)
@@ -300,6 +314,9 @@ class DanbooruPostExtractor(DanbooruExtractor):
("https://booru.allthefallen.moe/posts/22", {
"content": "21dda68e1d7e0a554078e62923f537d8e895cac8",
}),
+ ("https://aibooru.online/posts/1", {
+ "content": "54d548743cd67799a62c77cbae97cfa0fec1b7e9",
+ }),
("https://danbooru.donmai.us/post/show/294929"),
("https://e621.net/post/show/535"),
)
@@ -334,6 +351,7 @@ class DanbooruPopularExtractor(DanbooruExtractor):
"count": ">= 70",
}),
("https://booru.allthefallen.moe/explore/posts/popular"),
+ ("https://aibooru.online/explore/posts/popular"),
)
def __init__(self, match):