v2: ID verification by state, 15 photos/5 albums, 20 quick replies, logo, mobile polish
This commit is contained in:
45
deploy/godaddy-probe-connect.py
Normal file
45
deploy/godaddy-probe-connect.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
|
||||
KEY = "2wYVpc3VT4_Gi9AsNqzJ6BtSfNz6nLDuo"
|
||||
SECRET = "NvC3qexGAU7Rd5QExUTH6z"
|
||||
DOMAIN = "exposedgays.com"
|
||||
BASE = "https://api.godaddy.com/v1"
|
||||
|
||||
|
||||
def gd(path, method="GET", body=None):
|
||||
req = urllib.request.Request(
|
||||
BASE + path,
|
||||
data=json.dumps(body).encode() if body else None,
|
||||
method=method,
|
||||
headers={
|
||||
"Authorization": f"sso-key {KEY}:{SECRET}",
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
},
|
||||
)
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=30) as r:
|
||||
raw = r.read().decode()
|
||||
return r.status, json.loads(raw) if raw else {}
|
||||
except urllib.error.HTTPError as e:
|
||||
raw = e.read().decode()
|
||||
try:
|
||||
return e.code, json.loads(raw)
|
||||
except Exception:
|
||||
return e.code, {"raw": raw[:500]}
|
||||
|
||||
|
||||
paths = [
|
||||
f"/domains/{DOMAIN}/connect",
|
||||
f"/domains/{DOMAIN}/connect/cloudflare",
|
||||
f"/domains/{DOMAIN}/suggest",
|
||||
f"/domains/{DOMAIN}/records/NS/@",
|
||||
]
|
||||
for p in paths:
|
||||
code, res = gd(p)
|
||||
print(f"{p} -> {code}")
|
||||
print(json.dumps(res, indent=2)[:800])
|
||||
print()
|
||||
Reference in New Issue
Block a user