python實(shí)現(xiàn)dnspod自動(dòng)更新dns解析的方法
更新時(shí)間:2014年02月14日 11:03:17 作者:
這篇文章主要介紹了python實(shí)現(xiàn)的dnspod自動(dòng)更新dns解析的方法,需要的朋友可以參考下
復(fù)制代碼 代碼如下:
def ddns():
"""
用當(dāng)前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()
# print response.status, response.reason
# data = response.read()
# print data
conn.close()
return response.status == 200
相關(guān)文章
Django分頁(yè)功能的實(shí)現(xiàn)代碼詳解
在本篇文章里小編給大家整理了關(guān)于Django分頁(yè)功能的實(shí)現(xiàn)代碼以及相關(guān)知識(shí)點(diǎn)內(nèi)容,需要的朋友們可以跟著學(xué)習(xí)參考下。2019-07-07
Python實(shí)戰(zhàn)使用XPath采集數(shù)據(jù)示例解析
這篇文章主要為大家介紹了Python實(shí)戰(zhàn)之使用XPath采集數(shù)據(jù)實(shí)現(xiàn)示例解析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪<BR>2023-04-04
在NumPy中創(chuàng)建空數(shù)組/矩陣的方法
今天小編就為大家分享一篇在NumPy中創(chuàng)建空數(shù)組/矩陣的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-06-06

