From 1821645b88088acbff024e244053bda89cff16ca Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 3 Nov 2023 15:50:08 +0300 Subject: [PATCH] more logging --- main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index b1205ad..2d2f596 100644 --- a/main.py +++ b/main.py @@ -119,7 +119,7 @@ async def send_post(post: E621Post, tag_list: List[str]): except Exception as e: logging.exception(e) else: - logging.warning('Not sending because url is None', post) + logging.warning('Not sending because url is None', post.file) except Exception as e: logging.exception(e) @@ -133,9 +133,7 @@ async def check_updates(): for tl_idx in range(0, len(tag_list), 40): tags = ' '.join(f'~{tag}' for tag in tag_list[tl_idx: tl_idx + 40]) logging.warning(tags) - posts = [] - for page in range(1, 2): - posts.extend(await e621.get_posts(tags, page)) + posts = await e621.get_posts(tags) if not posts: return already_sent: List = await redis.smismember('e621:sent', [p.id for p in posts])