increase post count in request
This commit is contained in:
parent
304b61f87d
commit
699defca3d
2
e621.py
2
e621.py
@ -134,7 +134,7 @@ class E621:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.client = httpx.AsyncClient(headers={'user-agent': 'bot/1.0 (bakatrouble)'}, base_url='https://e621.net')
|
self.client = httpx.AsyncClient(headers={'user-agent': 'bot/1.0 (bakatrouble)'}, base_url='https://e621.net')
|
||||||
|
|
||||||
async def get_posts(self, tags='', page=1, limit=50) -> List[E621Post]:
|
async def get_posts(self, tags='', page=1, limit=320) -> List[E621Post]:
|
||||||
r = (await self.client.get('/posts.json', params={'tags': tags, 'page': page, 'limit': limit})).json()
|
r = (await self.client.get('/posts.json', params={'tags': tags, 'page': page, 'limit': limit})).json()
|
||||||
return [E621Post.from_dict(p) for p in r['posts']]
|
return [E621Post.from_dict(p) for p in r['posts']]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user