替换上你的login_token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得domain_id可以用curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=xxxxx,xxxxxxxx&format=json" | python -m json.tool
获得record_id类似
curl -k https://dnsapi.cn/Record.List -d "login_token=xxxxx,xxxxxxxx&domain_id=xxx&format=json" | python -m json.tool