Update server.py
This commit is contained in:
parent
90cb7e93fe
commit
a3eef76bee
1 changed files with 0 additions and 3 deletions
|
@ -87,11 +87,9 @@ def relay():
|
||||||
code += f"<ul><li>{temp}</li></ul>\n"
|
code += f"<ul><li>{temp}</li></ul>\n"
|
||||||
elif i[0:2] == "=>":
|
elif i[0:2] == "=>":
|
||||||
temp = " ".join(i[2:].strip().replace(" ", " ").split(" "))
|
temp = " ".join(i[2:].strip().replace(" ", " ").split(" "))
|
||||||
print(temp)
|
|
||||||
goto = temp.split(" ")[0]
|
goto = temp.split(" ")[0]
|
||||||
prse = urlparse(goto)
|
prse = urlparse(goto)
|
||||||
extra = ""
|
extra = ""
|
||||||
print(goto)
|
|
||||||
extracomment = goto
|
extracomment = goto
|
||||||
if prse.netloc == "" and prse.scheme == "":
|
if prse.netloc == "" and prse.scheme == "":
|
||||||
isdir = url[len(url) - 1] == "/"
|
isdir = url[len(url) - 1] == "/"
|
||||||
|
@ -101,7 +99,6 @@ def relay():
|
||||||
else:
|
else:
|
||||||
tempurl = "/".join(url.split("/")[:-1]) + "/" + goto
|
tempurl = "/".join(url.split("/")[:-1]) + "/" + goto
|
||||||
goto = f"/gem?gemini={tempurl}"
|
goto = f"/gem?gemini={tempurl}"
|
||||||
print(goto)
|
|
||||||
elif prse.scheme != "gemini":
|
elif prse.scheme != "gemini":
|
||||||
extra = "<img height=\"12\" src=\"/external.png\">"
|
extra = "<img height=\"12\" src=\"/external.png\">"
|
||||||
extracomment = f"This link points to an address that isn't gemini ({prse.scheme})"
|
extracomment = f"This link points to an address that isn't gemini ({prse.scheme})"
|
||||||
|
|
Loading…
Add table
Reference in a new issue