recover file url if not present

This commit is contained in:
2023-11-03 15:57:29 +03:00
parent 6cb3948fa5
commit 992493aa15
2 changed files with 65 additions and 63 deletions

View File

@@ -136,9 +136,8 @@ class E621:
def __init__(self):
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=100) -> 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()
logging.warning(json.dumps(r))
return [E621Post.from_dict(p) for p in r['posts']]
async def get_post(self, post_id: str) -> E621Post: