show link to gemini url on blocked requests

This commit is contained in:
Alexander 2023-03-02 19:37:16 +00:00
parent 78ab2ea1b4
commit f8dba3e105
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ def query(url = None):
print(clean(responsetext.decode('utf8', errors='ignore')))
print("</code></pre>")
elif response.responsecode == 20:
print(f"<h1>RESPONSE: \"20 Success\", but...</h1><p>The Wobbly browser only supports text responses, and this response is '{clean(response.meta)}'.</p>")
print(f"<h1>RESPONSE: \"20 Success\", but...</h1><p>The Wobbly browser only supports text responses, and this response is '{clean(response.meta)}'.</p>\n<p>You can visit the url with a real gemini browser via <a href='{clean(baseurl)}'>{clean(baseurl)}</a></p>")
elif response.responsecode in [40, 41, 42, 43, 44, 50, 51, 52, 53, 59]:
print(f"<h1>RESPONSE: \"{str(response.responsecode)} {clean(response.meta)}\"</h1><p>This is an error message from the server. Hopefully it makes sense to you.</p>")
elif response.responsecode in [60, 61, 62]: