windows 双击运行

This commit is contained in:
New Future
2016-11-07 11:03:02 +08:00
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ def update_record(domain, value, record_type="A"): # 更改记录
else:
result[id]="update fail!\n"+str(r)
else:
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)
+2
View File
@@ -0,0 +1,2 @@
@ECHO OFF
python %~dp0run.py >> %~dp0run.log
+2
View File
@@ -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)