@@ -115,7 +115,7 @@ def update_record(domain, value, record_type="A"): # 更改记录
else:
result[id]="update fail!\n"+str(r)
- result[id]=value
+ result[id]=domain
else: # create
#http://www.dnspod.cn/docs/records.html#record-create
r = request("Record.Create", domain_id=domainid, value=value, sub_domain=sub, record_type=record_type, record_line="默认", ttl=600)
@@ -0,0 +1,2 @@
+@ECHO OFF
+python %~dp0run.py >> %~dp0run.log
@@ -5,6 +5,7 @@ import dnspod
import ip
import json
import argparse
+import time
def get_config(key=None, file="config.json"):
if not hasattr(get_config, "config"):
@@ -20,6 +21,7 @@ def get_config(key=None, file="config.json"):
def update():
+ print time.ctime()
index4=get_config('index4') or 0
if str(index4).isdigit():
ipv4 = ip.local_v4(index4)