From ac02e462035d7bcd44cf769118451c68cf9fbc2c Mon Sep 17 00:00:00 2001 From: Ching Date: Thu, 4 Apr 2024 14:14:07 +0800 Subject: [PATCH] fix: Fix logging issue and convert status ID to string TUN-45 --- mas2ff2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mas2ff2.py b/mas2ff2.py index e12b04b..f4fd178 100644 --- a/mas2ff2.py +++ b/mas2ff2.py @@ -165,11 +165,11 @@ def run(instance, access_token, fanfou_cookie, fanfou_token): if str(status['id']) not in posted_ids: content = status['content'].replace('
', '\n') content = re.sub('<.*?>', '', content) - logger.info(status['id'] + ' ' + content) + logger.info(str(status['id']) + ' ' + content) post_fanfou(fanfou_cookie, fanfou_token, content, status['media_attachments']) with open(last_id_file, 'a') as f: f.write(str(status['id']) + '\n') - posted_ids.append(status['id']) + posted_ids.append(str(status['id'])) logger.info('write toot %s', status['content']) time.sleep(10) # update min_id