Update server.py

This commit is contained in:
Nova Cat 2025-01-13 16:17:34 -08:00
parent 90cb7e93fe
commit a3eef76bee

View file

@ -87,11 +87,9 @@ def relay():
code += f"<ul><li>{temp}</li></ul>\n"
elif i[0:2] == "=>":
temp = " ".join(i[2:].strip().replace(" ", " ").split(" "))
print(temp)
goto = temp.split(" ")[0]
prse = urlparse(goto)
extra = ""
print(goto)
extracomment = goto
if prse.netloc == "" and prse.scheme == "":
isdir = url[len(url) - 1] == "/"
@ -101,7 +99,6 @@ def relay():
else:
tempurl = "/".join(url.split("/")[:-1]) + "/" + goto
goto = f"/gem?gemini={tempurl}"
print(goto)
elif prse.scheme != "gemini":
extra = "<img height=\"12\" src=\"/external.png\">"
extracomment = f"This link points to an address that isn't gemini ({prse.scheme})"