1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 04:32:51 +01:00

[kemonoparty] update pagination offset

This commit is contained in:
Mike Fährmann 2022-10-17 10:22:12 +02:00
parent 52d1eb928d
commit 94a2dfe205
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -230,9 +230,10 @@ class KemonopartyUserExtractor(KemonopartyExtractor):
posts = self.request(url, params=params).json()
yield from posts
if len(posts) < 25:
cnt = len(posts)
if cnt < 25:
return
params["o"] += 25
params["o"] += cnt
class KemonopartyPostExtractor(KemonopartyExtractor):
@ -420,9 +421,10 @@ class KemonopartyDiscordExtractor(KemonopartyExtractor):
posts = self.request(url, params=params).json()
yield from posts
if len(posts) < 25:
cnt = len(posts)
if cnt < 25:
break
params["skip"] += 25
params["skip"] += cnt
class KemonopartyDiscordServerExtractor(KemonopartyExtractor):