From 6b22af9720f4599eb6e2cb524f6f7aa57846ad17 Mon Sep 17 00:00:00 2001 From: Klion Xu Date: Thu, 19 Oct 2023 10:32:59 +0800 Subject: [PATCH] [kemonoparty] update API endpoint (#4676) --- gallery_dl/extractor/kemonoparty.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gallery_dl/extractor/kemonoparty.py b/gallery_dl/extractor/kemonoparty.py index 6f6ba70d75..e92a0b9d30 100644 --- a/gallery_dl/extractor/kemonoparty.py +++ b/gallery_dl/extractor/kemonoparty.py @@ -208,7 +208,7 @@ def _extract_dms(self, post): @memcache(keyarg=1) def _discord_channels(self, server): - url = "{}/api/discord/channels/lookup?q={}".format( + url = "{}/api/v1/discord/channels/lookup/{}".format( self.root, server) return self.request(url).json() @@ -228,7 +228,7 @@ def __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.api_url = "{}/api/v1/{}/user/{}".format(self.root, service, user_id) self.user_url = "{}/{}/user/{}".format(self.root, service, user_id) self.offset = text.parse_int(offset) @@ -256,7 +256,7 @@ def __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.api_url = "{}/api/v1/{}/user/{}/post/{}".format( self.root, service, user_id, post_id) self.user_url = "{}/{}/user/{}".format(self.root, service, user_id) @@ -344,7 +344,7 @@ def items(self): yield Message.Url, url, post def posts(self): - url = "{}/api/discord/channel/{}".format(self.root, self.channel_id) + url = "{}/api/v1/discord/channel/{}".format(self.root, self.channel_id) params = {"skip": 0} while True: