From f4abf9e306ebbc2ee82cd87f11b6fd7fdce5940e Mon Sep 17 00:00:00 2001 From: Xirui Xiong <111547592+Ark-Aak@users.noreply.github.com> Date: Fri, 22 Aug 2025 18:31:51 +0800 Subject: [PATCH 1/2] Update main.py --- src/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index 0b75d30..6ccc4a9 100644 --- a/src/main.py +++ b/src/main.py @@ -9,6 +9,7 @@ from rich.table import Table from rich.live import Live from utils import find_qr_code +import re with open("./config.yaml") as stream: try: @@ -49,11 +50,13 @@ logging.info("识别成功,二维码内容:" + qrRaw) break -store = local_data(clientId=qrRaw[81:]) +match = re.search(r":(\d+)/([0-9a-fA-F-]+)", qrRaw) +uuid_str = match.group(2) if match else None + +store = local_data(clientId=uuid_str) store.limitA = int(config["Channel_A_limit"]) store.limitB = int(config["Channel_B_limit"]) - def on_message(ws, message_raw): logger.debug(f"Received message: {message_raw}") message_dict: dict = json.loads(message_raw) From 564302cb8477085fc8d02f66972f6cbdcc992348 Mon Sep 17 00:00:00 2001 From: Xirui Xiong <111547592+Ark-Aak@users.noreply.github.com> Date: Sun, 11 Jan 2026 12:28:14 +0800 Subject: [PATCH 2/2] Comment out response function call in message handler Comment out the response function call in the message handling. --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 6ccc4a9..a7e6009 100644 --- a/src/main.py +++ b/src/main.py @@ -82,7 +82,7 @@ def on_message(ws, message_raw): break_(ws, message) elif message.type_ == "error": error(ws, message) - response(ws, "feedback-0", store) + # response(ws, "feedback-0", store) def on_error(ws, error):