[kemonoparty] use service as subcategory (closes #2147)

pull/2197/head
Mike Fährmann 3 years ago
parent fa7d92f7a9
commit 6af8d71da6
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -205,8 +205,9 @@ class KemonopartyUserExtractor(KemonopartyExtractor):
)
def __init__(self, match):
KemonopartyExtractor.__init__(self, match)
_, service, user_id, offset = match.groups()
self.subcategory = service
KemonopartyExtractor.__init__(self, match)
self.api_url = "{}/api/{}/user/{}".format(self.root, service, user_id)
self.user_url = "{}/{}/user/{}".format(self.root, service, user_id)
self.offset = text.parse_int(offset)
@ -247,7 +248,7 @@ class KemonopartyPostExtractor(KemonopartyExtractor):
"published": "Sun, 11 Aug 2019 02:09:04 GMT",
"service": "fanbox",
"shared_file": False,
"subcategory": "post",
"subcategory": "fanbox",
"title": "c96取り置き",
"type": "file",
"user": "6993449",
@ -296,8 +297,9 @@ class KemonopartyPostExtractor(KemonopartyExtractor):
)
def __init__(self, match):
KemonopartyExtractor.__init__(self, match)
_, service, user_id, post_id = match.groups()
self.subcategory = service
KemonopartyExtractor.__init__(self, match)
self.api_url = "{}/api/{}/user/{}/post/{}".format(
self.root, service, user_id, post_id)
self.user_url = "{}/{}/user/{}".format(self.root, service, user_id)

Loading…
Cancel
Save