From 8d81096460b109f89eccc0ac952e5e03b5c8eed9 Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Wed, 17 Apr 2024 11:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0UI=E9=80=89=E9=A1=B9=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E8=87=AA=E5=8A=A8=E6=89=93=E5=BC=80=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pywxdump/cli.py | 4 +++- pywxdump/server.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pywxdump/cli.py b/pywxdump/cli.py index 674cb2aa..5e903628 100644 --- a/pywxdump/cli.py +++ b/pywxdump/cli.py @@ -478,6 +478,7 @@ def init_parses(self, parser): parser.add_argument("-p", '--port', metavar="", type=int, help="(可选)端口号", default=5000) parser.add_argument("--online", help="(可选)是否在线查看(局域网查看)", default=False, action='store_true') parser.add_argument("--debug", help="(可选)是否开启debug模式", default=False, action='store_true') + parser.add_argument("--openBrowser", help="(可选)是否自动打开浏览器", default=True, action='store_true') return parser def run(self, args): @@ -486,8 +487,9 @@ def run(self, args): online = args.online port = args.port debug = args.debug + isopenBrowser = args.openBrowser - start_falsk(port=port, online=online, debug=debug) + start_falsk(port=port, online=online, debug=debug, isopenBrowser=isopenBrowser) class MainApi(BaseSubMainClass): diff --git a/pywxdump/server.py b/pywxdump/server.py index 8f1a68cf..b3fd3bf9 100644 --- a/pywxdump/server.py +++ b/pywxdump/server.py @@ -127,4 +127,4 @@ def is_port_in_use(host, port): my_wxid = "****" start_falsk(msg_path=msg_path, micro_path=micro_path, media_path=media_path, wx_path=wx_path, my_wxid=my_wxid, - port=5000, online=False, debug=False) + port=5000, online=False, debug=False, isopenBrowser=False)