diff --git a/pywxdump/cli.py b/pywxdump/cli.py index 674cb2a..5e90362 100644 --- a/pywxdump/cli.py +++ b/pywxdump/cli.py @@ -478,6 +478,7 @@ class MainUi(BaseSubMainClass): 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 @@ class MainUi(BaseSubMainClass): 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 8f1a68c..b3fd3bf 100644 --- a/pywxdump/server.py +++ b/pywxdump/server.py @@ -127,4 +127,4 @@ if __name__ == '__main__': 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)