mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-29 19:08:44 +00:00
mitmweb: use x-www-browser
This commit is contained in:
parent
4bf93ec379
commit
ac5ca0fc63
@ -44,7 +44,9 @@ def open_browser(url: str) -> bool:
|
|||||||
False, if no suitable browser has been found.
|
False, if no suitable browser has been found.
|
||||||
"""
|
"""
|
||||||
browsers = (
|
browsers = (
|
||||||
"windows-default", "wslview %s", "macosx",
|
"windows-default", "macosx",
|
||||||
|
"wslview %s",
|
||||||
|
"x-www-browser %s", "gnome-open %s",
|
||||||
"google-chrome", "chrome", "chromium", "chromium-browser",
|
"google-chrome", "chrome", "chromium", "chromium-browser",
|
||||||
"firefox", "opera", "safari",
|
"firefox", "opera", "safari",
|
||||||
)
|
)
|
||||||
@ -54,6 +56,6 @@ def open_browser(url: str) -> bool:
|
|||||||
except webbrowser.Error:
|
except webbrowser.Error:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
b.open(url)
|
if b.open(url):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user