[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
2 changed files with 21 additions and 1 deletions

View File

@@ -135,6 +135,26 @@ class InkbunnyUserExtractor(InkbunnyExtractor):
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):
"""Extractor for inkbunny user favorites"""
subcategory = "favorite"