1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[inkbunny] add 'pool' extractor (#1937)

This commit is contained in:
Mike Fährmann 2021-10-09 22:07:07 +02:00
parent 373d3e1c57
commit b93915c113
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 21 additions and 1 deletions

View File

@ -364,7 +364,7 @@ Consider all sites to be NSFW unless otherwise known.
<tr> <tr>
<td>Inkbunny</td> <td>Inkbunny</td>
<td>https://inkbunny.net/</td> <td>https://inkbunny.net/</td>
<td>Favorites, Posts, User Profiles</td> <td>Favorites, Pools, Posts, User Profiles</td>
<td>Supported</td> <td>Supported</td>
</tr> </tr>
<tr> <tr>

View File

@ -135,6 +135,26 @@ class InkbunnyUserExtractor(InkbunnyExtractor):
return self.api.search(params) return self.api.search(params)
class InkbunnyPoolExtractor(InkbunnyExtractor):
"""Extractor for inkbunny pools"""
subcategory = "pool"
pattern = BASE_PATTERN + r"/poolview_process\.php\?pool_id=(\d+)"
test = ("https://inkbunny.net/poolview_process.php?pool_id=28985", {
"count": 9,
})
def __init__(self, match):
InkbunnyExtractor.__init__(self, match)
self.pool_id = match.group(1)
def posts(self):
params = {
"pool_id": self.pool_id,
"orderby": "pool_order",
}
return self.api.search(params)
class InkbunnyFavoriteExtractor(InkbunnyExtractor): class InkbunnyFavoriteExtractor(InkbunnyExtractor):
"""Extractor for inkbunny user favorites""" """Extractor for inkbunny user favorites"""
subcategory = "favorite" subcategory = "favorite"