14 lines
355 B
Python
14 lines
355 B
Python
import urllib.request
|
|
import ssl
|
|
|
|
ctx = ssl.create_default_context()
|
|
ctx.check_hostname = False
|
|
ctx.verify_mode = ssl.CERT_NONE
|
|
|
|
try:
|
|
with urllib.request.urlopen("https://gotify.snarfnet.net/version", context=ctx, timeout=5) as resp:
|
|
print("Gotify version:", resp.read().decode().strip())
|
|
except Exception as e:
|
|
print("Gotify error:", e)
|
|
|