(raw: str)
| 315 | |
| 316 | |
| 317 | def _extract_endpoint(raw: str) -> Optional[str]: |
| 318 | match = re.search(r"url:\s*(/[^\s)]+)", raw, re.IGNORECASE) |
| 319 | if match: |
| 320 | return match.group(1) |
| 321 | match = re.search(r"with url:\s*(/[^\s)]+)", raw, re.IGNORECASE) |
| 322 | if match: |
| 323 | return match.group(1) |
| 324 | match = re.search(r"https?://[^/]+(/[^\s)]+)", raw) |
| 325 | if match: |
| 326 | return match.group(1) |
| 327 | return None |
| 328 | |
| 329 | |
| 330 | def _looks_like_proxy_refused(text: str) -> bool: |