You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
448 B

import requests
TOKEN = "EASYDNS_TOKEN"
DOMAINS = [
"example.example.com",
]
USERNAME = "EASYDNS_USERNAME"
# NO LONGER CONFIG
TLD = DOMAINS[0].split(".")[-1] # can only update one TLD at a time
URL = f"https://{USERNAME}:{TOKEN}@api.cp.easydns.com/dyn/generic.php"
for domain in DOMAINS:
resp = requests.get(URL, {"hostname": domain, "TLD": TLD})
code = resp.status_code
content = str(resp.content)
print(f"CODE: {code}:\n{content}")