more logging
This commit is contained in:
parent
1821645b88
commit
006b1bdaa8
3
e621.py
3
e621.py
@ -1,3 +1,5 @@
|
|||||||
|
import json
|
||||||
|
import logging
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from dataclasses_json import dataclass_json
|
from dataclasses_json import dataclass_json
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
@ -136,6 +138,7 @@ class E621:
|
|||||||
|
|
||||||
async def get_posts(self, tags='', page=1, limit=320) -> 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()
|
||||||
|
logging.warning(json.dumps(r))
|
||||||
return [E621Post.from_dict(p) for p in r['posts']]
|
return [E621Post.from_dict(p) for p in r['posts']]
|
||||||
|
|
||||||
async def get_post(self, post_id: str) -> E621Post:
|
async def get_post(self, post_id: str) -> E621Post:
|
||||||
|
Loading…
Reference in New Issue
Block a user