MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _normalize_http_base_url

Function _normalize_http_base_url

src/api/admin.py:247–256  ·  view source on GitHub ↗
(base_url: str)

Source from the content-addressed store, hash-verified

245
246
247def _normalize_http_base_url(base_url: str) -> str:
248 normalized = (base_url or "").strip().rstrip("/")
249 if not normalized:
250 raise RuntimeError("远程打码服务地址未配置")
251
252 parsed = urlparse(normalized)
253 if parsed.scheme not in {"http", "https"} or not parsed.netloc:
254 raise RuntimeError("远程打码服务地址格式错误,必须是 http(s)://host[:port]")
255
256 return normalized
257
258
259def _get_remote_browser_client_config() -> tuple[str, str, int]:

Callers 2

update_captcha_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected