复制代码 代码如下:
def ddns():
"""
用当前ip更新ddns
"""
headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/json"}
conn = httplib.HTTPSConnection("dnsapi.cn", timeout=30)
conn.request("POST", "/Record.Ddns", urllib.urlencode(ddns_params), headers)
response = conn.getresponse()
conn.close()
return response.status == 200
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8