From db53421c25b9991376305fc3d2e922b978ddeca3 Mon Sep 17 00:00:00 2001 From: ikaros <327209194@qq.com> Date: Wed, 7 Feb 2024 17:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtiktok=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E4=BB=A3=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tiktok.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tiktok.py b/tiktok.py index 75c1ca8c..db3b2191 100644 --- a/tiktok.py +++ b/tiktok.py @@ -766,7 +766,7 @@ def load_data_list(type): # Define how you want to handle specific events via decorator @client.on("connect") async def on_connect(_: ConnectEvent): - logging.info("连接到 房间ID:", client.room_id) + logging.info(f"连接到 房间ID:{client.room_id}") @client.on("disconnect") async def on_disconnect(event: DisconnectEvent): @@ -890,11 +890,12 @@ async def on_follow(event: FollowEvent): client.run() except LiveNotFound: - logging.info(f"用户ID: `@{client.unique_id}` 好像不在线捏, 1分钟后重试...") + logging.info(f"用户ID: @{client.unique_id} 好像不在线捏, 1分钟后重试...") # 退出程序 def exit_handler(signum, frame): - logging.info("Received signal:", signum) + logging.info(f"Received signal:{signum}") + os._exit(0) if __name__ == '__main__':