cosmetic changes
This commit is contained in:
parent
2158b78e77
commit
c6a45ba819
|
@ -213,7 +213,6 @@ class GeminiItem():
|
||||||
self.title = self.name
|
self.title = self.name
|
||||||
else:
|
else:
|
||||||
self.title = self.path
|
self.title = self.path
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.title = self.host
|
self.title = self.host
|
||||||
if "user" in self.path:
|
if "user" in self.path:
|
||||||
|
@ -406,8 +405,6 @@ CRLF = '\r\n'
|
||||||
def looks_like_url(word):
|
def looks_like_url(word):
|
||||||
try:
|
try:
|
||||||
url = fix_ipv6_url(word).strip()
|
url = fix_ipv6_url(word).strip()
|
||||||
#print("looks_like_url before %s"%word)
|
|
||||||
#print("looks_like_url after %s"%url)
|
|
||||||
parsed = urllib.parse.urlparse(url)
|
parsed = urllib.parse.urlparse(url)
|
||||||
#sometimes, urllib crashed only when requesting the port
|
#sometimes, urllib crashed only when requesting the port
|
||||||
port = parsed.port
|
port = parsed.port
|
||||||
|
@ -415,7 +412,8 @@ def looks_like_url(word):
|
||||||
or word.startswith("https://")
|
or word.startswith("https://")
|
||||||
if not start:
|
if not start:
|
||||||
return looks_like_url("gemini://"+word)
|
return looks_like_url("gemini://"+word)
|
||||||
return "." in word and start
|
else:
|
||||||
|
return "." in word
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue