diff --git a/server.py b/server.py index 99868d8..74e4f1b 100644 --- a/server.py +++ b/server.py @@ -92,6 +92,7 @@ def relay(): prse = urlparse(goto) extra = "" print(goto) + extracomment = goto if prse.netloc == "" and prse.scheme == "": isdir = url[len(url) - 1] == "/" if isdir: @@ -102,17 +103,19 @@ def relay(): goto = f"/gem?gemini={tempurl}" print(goto) elif prse.scheme != "gemini": - extra = "" + extra = "" + extracomment = f"This link points to an address that isn't gemini ({prse.scheme})" else: if prse.hostname != urlparse(fulladdr).hostname: - extra = "" + extra = "" + extracomment = f"This link points to an address that isn't from the server you're currently connecting to ({prse.hostname})" goto = goto.replace("gemini://", "") goto = f"/gem?gemini={goto}" if temp.split(" ") == 1: comment = goto else: comment = " ".join(temp.split(" ")[1:]) - code += f"
\n" + code += f"\n" else: code += f"{i}
\n" if title == "Something went wrong...":