(u: str)
| 134 | |
| 135 | |
| 136 | def _host(u: str) -> str: |
| 137 | from urllib.parse import urlparse |
| 138 | try: |
| 139 | return urlparse(u).netloc.replace("www.", "") or u |
| 140 | except Exception: |
| 141 | return u |
| 142 | |
| 143 | |
| 144 | def collect_pages(steps: list[dict], fallback_site: str | None) -> list[dict]: |