optimize log

This commit is contained in:
felinae98 2021-02-09 22:10:18 +08:00
parent 7904882f61
commit 265a5e4393
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ async def fetch_and_send(target_type: str):
bot = bot_list[0] if bot_list else None
for new_post in new_posts:
logger.warning('get new {} dynamic: {}'.format(target_type, new_post.url))
logger.warning(new_post[:50])
logger.warning(new_post)
if not bot:
logger.warning('no bot connected')
else:

View File

@ -29,4 +29,4 @@ class Post:
self.pics = pics
def __str__(self):
return 'type: {}\ntext: {}\nurl: {}\npic: {}'.format(self.target_type, self.text, self.url, ','.join(self.pics))
return 'type: {}\ntext: {}\nurl: {}\npic: {}'.format(self.target_type, self.text[:50], self.url, ','.join(map(lambda x: 'b64img' if x.startswith('base64') else x, self.pics)))