Browse Source

Bugfixes: typos

pull/1/head
sipp11 7 years ago
parent
commit
8db62e081f
  1. 16
      update.py

16
update.py

@ -5,10 +5,11 @@ import sys
import xml.etree.ElementTree as ET
from requests import get
BASE_URL = 'https://www.namesilo.com/api/dnsUpdateRecord?version=1&type=xml&'
UPDATE_URL = '{base}key={key}&domain={domain}&rrid={rrid}&' \
BASE_URL = 'https://www.namesilo.com/api'
UPDATE_URL = '{base}/dnsUpdateRecord?version=1&type=xml&key={key}' \
'&domain={domain}&rrid={rrid}&' \
'rrhost={host}&rrvalue={new_value}&rrttl=7207'
LIST_URL = '{base}key={key}&domain={domain}'
LIST_URL = '{base}/dnsListRecords?version=1&type=xml&key={key}&domain={domain}'
EVERYDAY_IP_SERVICE = 'https://tool.everyday.in.th/ip?format=text'
@ -47,8 +48,13 @@ def get_namesilo_dns(key, domain, target_host):
def update_namesilo_data(key, domain, rrid, subdomain, new_value):
res = get(UPDATE_URL.format(base=BASE_URL, key=key, domain=domainม
rrid=rrid, host=host, new_value=new_value))
res = get(UPDATE_URL.format(
base=BASE_URL,
key=key,
domain=domain,
rrid=rrid,
host=subdomain,
new_value=new_value))
if res.status_code != 200:
return None
return True

Loading…
Cancel
Save