From c55b7295cf244ed6f346539bb1af872a4770188c Mon Sep 17 00:00:00 2001 From: yqchilde Date: Sun, 20 Jun 2021 01:58:50 +0800 Subject: [PATCH] Update test_main.py. --- test_main.py | 4 ++-- utils/listener.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test_main.py b/test_main.py index bdb348c7..d4096035 100644 --- a/test_main.py +++ b/test_main.py @@ -1,7 +1,7 @@ import sys import asyncio -from utils.listener import WebSocket +from utils.listener import SmsSocket from main import ws_conn from utils.config import get_config @@ -18,7 +18,7 @@ def test_websocket(): recv = asyncio.get_event_loop().run_until_complete(ws_conn(get_config()["sms_captcha"]["ws_conn_url"])) else: print(f"短信验证码测试,请在手机上访问以下任一个监听地址测试连通性") - recv = WebSocket().listener() + recv = SmsSocket().listener() if recv != "": pass except Exception as e: diff --git a/utils/listener.py b/utils/listener.py index ce15631a..ce463738 100644 --- a/utils/listener.py +++ b/utils/listener.py @@ -106,7 +106,7 @@ def listener(self, *args, **kwargs): return json.dumps({"sms_code": a}) except AttributeError: - logger.warning(f"监听到IP: \t{ca[0]}\t访问,但未获取到短信验证码") + logger.warning(f"监听到IP: {ca[0]}访问,但未获取到短信验证码") except OSError: logger.warning("请确保你没有打开另外一个监听脚本或jd_tools")