mirror of
https://github.com/NewFuture/DDNS.git
synced 2026-10-21 03:55:38 +00:00
windows 双击运行
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user