fix post version pagination
This commit is contained in:
parent
7f64d44da8
commit
501c9ca1ab
6
e621.py
6
e621.py
@ -173,7 +173,11 @@ class E621:
|
|||||||
return (await self.get_posts(f'id:{post_id}'))[0]
|
return (await self.get_posts(f'id:{post_id}'))[0]
|
||||||
|
|
||||||
async def get_post_versions(self, start_id=0, page=1, limit=320) -> List[E621PostVersion]:
|
async def get_post_versions(self, start_id=0, page=1, limit=320) -> List[E621PostVersion]:
|
||||||
r = (await self.client.get('/post_versions.json', params={'search[start_id]': start_id, 'limit': limit})).json()
|
r = (await self.client.get('/post_versions.json', params={
|
||||||
|
'search[start_id]': start_id,
|
||||||
|
'limit': limit,
|
||||||
|
'page': page,
|
||||||
|
})).json()
|
||||||
if 'success' in r:
|
if 'success' in r:
|
||||||
return []
|
return []
|
||||||
return [E621PostVersion.from_dict(p) for p in r]
|
return [E621PostVersion.from_dict(p) for p in r]
|
||||||
|
Loading…
Reference in New Issue
Block a user