Skip to content

Commit

Permalink
merge #4676: [kemonoparty][coomerparty] update API endpoints (#4676)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 19, 2023
2 parents bfdc076 + dc1c213 commit 761fa68
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gallery_dl/extractor/kemonoparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -228,7 +228,8 @@ 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)

Expand Down Expand Up @@ -256,7 +257,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)

Expand Down Expand Up @@ -344,7 +345,8 @@ 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:
Expand Down

0 comments on commit 761fa68

Please sign in to comment.