MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / open_in_browser

Function open_in_browser

Scripts/Developer Base/Free Internet.py:2073–2083  ·  view source on GitHub ↗
(url: str)

Source from the content-addressed store, hash-verified

2071
2072# ---------------- auto open ----------------
2073def open_in_browser(url: str) -> None:
2074 try:
2075 if which("termux-open-url"):
2076 subprocess.Popen(["termux-open-url", url], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
2077 return
2078 if which("xdg-open"):
2079 subprocess.Popen(["xdg-open", url], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
2080 return
2081 except Exception:
2082 pass
2083 print(f"Open this in your browser: {url}")
2084
2085
2086def delayed_open(url: str, delay: float = 0.8) -> None:

Callers 1

_workerFunction · 0.70

Calls 2

printFunction · 0.85
whichFunction · 0.70

Tested by

no test coverage detected