更新 monitor_web.py

Signed-off-by: zikai <1621362626@qq.com>
This commit is contained in:
2026-06-05 08:57:11 +00:00
parent 5e0eaa33fa
commit 276e24e830

View File

@@ -3073,15 +3073,15 @@ def main():
_start_monitor_if_ready() _start_monitor_if_ready()
server = ThreadedServer(('0.0.0.0', PORT), Handler) server = ThreadedServer(('localhost', PORT), Handler)
print(f"=> http://localhost:{PORT}", flush=True) print(f"=> http://localhost:{PORT}", flush=True)
print("Ctrl+C 停止\n", flush=True) print("Ctrl+C 停止\n", flush=True)
try: # try:
import webbrowser # import webbrowser
webbrowser.open(f'http://localhost:{PORT}') # webbrowser.open(f'http://localhost:{PORT}')
except Exception: # except Exception:
pass # pass
try: try:
server.serve_forever() server.serve_forever()