Merge pull request 'show link to gemini url on blocked requests' (#1) from alexlehm/wobbly:blocked_request_gemini_url into master

Reviewed-on: #1
This commit is contained in:
James Tomasino 2023-03-04 20:11:20 +00:00
commit 593d0d6dfd
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]: