[philomena] support furbooru.org (closes #1995)

This commit is contained in:
Mike Fährmann
2021-11-15 20:57:51 +01:00
parent 4377f1c284
commit cfa4876848
2 changed files with 18 additions and 0 deletions

View File

@@ -937,6 +937,12 @@ Consider all sites to be NSFW unless otherwise known.
<td>Galleries, Posts, Search Results</td>
<td><a href="configuration.rst#extractorderpibooruapi-key">API Key</a></td>
</tr>
<tr>
<td>Furbooru</td>
<td>https://furbooru.org/</td>
<td>Galleries, Posts, Search Results</td>
<td></td>
</tr>
<tr>
<td>Ponybooru</td>
<td>https://ponybooru.org/</td>

View File

@@ -62,6 +62,8 @@ INSTANCES = {
"filter_id": "56027"},
"ponybooru" : {"root": "https://ponybooru.org",
"filter_id": "2"},
"furbooru" : {"root": "https://furbooru.org",
"filter_id": "2"},
}
BASE_PATTERN = PhilomenaExtractor.update(INSTANCES)
@@ -124,6 +126,9 @@ class PhilomenaPostExtractor(PhilomenaExtractor):
("https://ponybooru.org/images/1", {
"content": "bca26f58fafd791fe07adcd2a28efd7751824605",
}),
("https://furbooru.org/images/1", {
"content": "9eaa1e1b32fa0f16520912257dbefaff238d5fd2",
}),
)
def __init__(self, match):
@@ -157,6 +162,10 @@ class PhilomenaSearchExtractor(PhilomenaExtractor):
"range": "40-60",
"count": 21,
}),
("https://furbooru.org/search?q=cute", {
"range": "40-60",
"count": 21,
}),
)
def __init__(self, match):
@@ -210,6 +219,9 @@ class PhilomenaGalleryExtractor(PhilomenaExtractor):
("https://ponybooru.org/galleries/27", {
"count": ">= 24",
}),
("https://furbooru.org/galleries/27", {
"count": ">= 13",
}),
)
def __init__(self, match):