Skip to content

Commit

Permalink
增加UI选项是否自动打开浏览器
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Apr 17, 2024
1 parent 691c534 commit 8d81096
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pywxdump/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pywxdump/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8d81096

Please sign in to comment.