Fix join_url for absolute paths

This commit is contained in:
2026-01-14 08:09:34 +00:00
parent f7fa3d9788
commit c90a998a5d

View File

@@ -30,7 +30,9 @@ async def fetch(url, tries=0):
def join_url(a: str, b: str) -> str:
return a.rstrip("/") + "/" + b.lstrip("/")
if b.startswith("/"):
return a[: a.rfind(".") + a[a.rfind(".") :].find("/")] + b
return a.rstrip("/") + "/" + b
async def traverse(pool: list[str], url: str, verbose=False) -> None: