(base_url: str)
| 245 | |
| 246 | |
| 247 | def _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 | |
| 259 | def _get_remote_browser_client_config() -> tuple[str, str, int]: |
no outgoing calls
no test coverage detected