当前位置: 首页 > news >正文

建电子商务网站注意事项友情链接交换

建电子商务网站注意事项,友情链接交换,三亚网站怎么制作,地名公共服务网站建设没找到api,托管到cloudflare也不行。就只能写代码了(只写了更新和添加单条ipv6记录) 需要修改的地方 请求头的cookies填自己的 data里的zone填自己的 import requests from lxml import etree host#子域名 cookies填自己的 zone自己域名的 …

没找到api,托管到cloudflare也不行。就只能写代码了(只写了更新和添加单条ipv6记录)
在这里插入图片描述
需要修改的地方
请求头的cookies填自己的
data里的zone填自己的

import requests
from lxml import etree host=''#子域名
cookies='填自己的'
zone='自己域名的'
ipv6 = requests.get('https://6.ipw.cn/').text#获取ipv6地址
print('本机ipv6地址:%s'%ipv6)get_records_url='https://www.cloudns.net/ajaxPages.php?action=records'
url ='https://www.cloudns.net/ajaxActions.php?action=records'
headers = {'cookie':cookies,'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'}#获取记录
get_records ={"show": "get","zone": zone,"type": "all","order-by": "null","page": "1"
}
#修改cname
update_data = {
'show': 'editRecord',
'zone': zone,
'record_id': '',
'settings[host]': '',
'settings[record]': '',
'settings[ttl]': '3600'
}
#添加aaaa
add_ipv6_data = {"show": "addRecord","zone": zone,"recordType": "AAAA","active": "1","settings[host]": "","settings[record]": "2409:8a62:6421:f881:9d23:59d2:10b:b1d5","settings[ttl]": "3600"
}response_records_table = requests.post(get_records_url,headers=headers,data=get_records)#获取dns记录表格# print(response_records.text)tree = etree.HTML(response_records_table.text)# 测试XPath表达式
record_host_path = '//*[@id="recordsBody"]/tr/td[2]/div/div/text()'#主机
record_type_path = '//*[@id="recordsBody"]/tr/td[3]/text()'#记录类型
record_value_path = '//*[@id="recordsBody"]/tr/td[4]/div/div/text()'#值/指向到
record_id_path = '//*[@id="recordsBody"]/tr/@id'#id
record_host = [host.strip() for host in tree.xpath(record_host_path)]
record_type = [type.strip() for type in tree.xpath(record_type_path)]
record_value= [value.strip() for value in tree.xpath(record_value_path)]
record_id = [id.replace('row-','') for id in tree.xpath(record_id_path)]
# print(record_host)
# print(record_type)
# print(record_value)
# print(record_id)l= len(record_type)
record_list = {}#存放记录的字典列表
a =0
while a < l:#做成类型对id+host+value的字典列表record_list.setdefault(record_type[a],[]).append(record_id[a])record_list.setdefault(record_type[a],[]).append(record_host[a])record_list.setdefault(record_type[a],[]).append(record_value[a])a+=1# print(record_list)
# print(record_list['AAAA'][0 ])def update_ipv6(ipv6,record_list,host):  #更新ipv6记录(ipv6你的ipv6地址,host就是子域名留空不加)update_data['record_id'] = record_list['AAAA'][0]update_data['settings[host]'] = hostupdate_data['settings[record]'] = ipv6print(update_data)response = requests.post(url,headers=headers,data=update_data)try:if response.json()['status'] == 1:print('修改成功')print(response.status_code)else :print(response.text)print('失败,状态码错误')except:print('失败,停止运行')exit()def add_ipv6(ipv6,host): #ipv6你的ipv6地址,host就是子域名留空不加add_ipv6_data['recordType']= 'AAAA'update_data['settings[host]'] = hostupdate_data['settings[record]'] = ipv6print(add_ipv6_data)response = requests.post(url,headers=headers,data=add_ipv6_data)try:if response.json()['status'] == 1:print('添加成功')print(response.status_code)else :print(response.text)print('失败,状态码错误')except:print('失败,停止运行')exit()if 'AAAA' in record_list:print('检测到已有ipv6地址记录')update_ipv6(ipv6=ipv6,record_list=record_list,host='hhhhh')
else: print('未检测到ipv6记录')add_ipv6(ipv6=ipv6,host='')

在这里插入图片描述


文章转载自:
http://allowably.yqsq.cn
http://woodlander.yqsq.cn
http://blues.yqsq.cn
http://intermedium.yqsq.cn
http://paknampho.yqsq.cn
http://unbroke.yqsq.cn
http://valine.yqsq.cn
http://krewe.yqsq.cn
http://chesterfieldian.yqsq.cn
http://tineid.yqsq.cn
http://technosphere.yqsq.cn
http://potato.yqsq.cn
http://ferula.yqsq.cn
http://angel.yqsq.cn
http://tamari.yqsq.cn
http://rudderfish.yqsq.cn
http://cytosol.yqsq.cn
http://separative.yqsq.cn
http://salpinx.yqsq.cn
http://gula.yqsq.cn
http://eap.yqsq.cn
http://encumber.yqsq.cn
http://cagm.yqsq.cn
http://voltolization.yqsq.cn
http://mhw.yqsq.cn
http://tweet.yqsq.cn
http://underestimate.yqsq.cn
http://hylotropic.yqsq.cn
http://siff.yqsq.cn
http://vernal.yqsq.cn
http://venation.yqsq.cn
http://wavetable.yqsq.cn
http://fiesta.yqsq.cn
http://sinaic.yqsq.cn
http://overleaf.yqsq.cn
http://cctv.yqsq.cn
http://hippological.yqsq.cn
http://possie.yqsq.cn
http://landworker.yqsq.cn
http://sewerage.yqsq.cn
http://heterocharge.yqsq.cn
http://unwieldiness.yqsq.cn
http://familygram.yqsq.cn
http://freshly.yqsq.cn
http://pinguin.yqsq.cn
http://hyphenation.yqsq.cn
http://symbolic.yqsq.cn
http://fragmental.yqsq.cn
http://monosyllable.yqsq.cn
http://eblis.yqsq.cn
http://insipid.yqsq.cn
http://aberdevine.yqsq.cn
http://anecdotic.yqsq.cn
http://radiomicrometer.yqsq.cn
http://cloister.yqsq.cn
http://resell.yqsq.cn
http://drupaceous.yqsq.cn
http://fibrocyte.yqsq.cn
http://acrodynia.yqsq.cn
http://basketry.yqsq.cn
http://euryhaline.yqsq.cn
http://convive.yqsq.cn
http://speos.yqsq.cn
http://interlocution.yqsq.cn
http://discussible.yqsq.cn
http://roundup.yqsq.cn
http://smds.yqsq.cn
http://nucleole.yqsq.cn
http://heterogeny.yqsq.cn
http://phalangal.yqsq.cn
http://trimphone.yqsq.cn
http://cortile.yqsq.cn
http://shunga.yqsq.cn
http://incommensurability.yqsq.cn
http://filtrability.yqsq.cn
http://excelled.yqsq.cn
http://sideboard.yqsq.cn
http://coder.yqsq.cn
http://tula.yqsq.cn
http://ironic.yqsq.cn
http://catania.yqsq.cn
http://bejesus.yqsq.cn
http://filing.yqsq.cn
http://tonally.yqsq.cn
http://envionment.yqsq.cn
http://chamaephyte.yqsq.cn
http://oppression.yqsq.cn
http://scavenger.yqsq.cn
http://dispauperization.yqsq.cn
http://ectogenetic.yqsq.cn
http://yawmeter.yqsq.cn
http://hypophysectomize.yqsq.cn
http://autarch.yqsq.cn
http://sholapur.yqsq.cn
http://chillsome.yqsq.cn
http://graz.yqsq.cn
http://consul.yqsq.cn
http://myg.yqsq.cn
http://ubiquitism.yqsq.cn
http://disoriented.yqsq.cn
http://www.dt0577.cn/news/74279.html

相关文章:

  • 天津七七一网站建设有限公司怎么样营销型网站推广方案
  • 长沙做网站建设公司排名网站怎么优化关键词
  • 福州专业网站设计公司腾讯会议价格
  • wordpress漫画主题合肥seo整站优化
  • 电子商务网站建设与管理实验目的四川seo哪里有
  • 西安网站建设 玖佰网络世界新闻最新消息
  • 宁波建设集团股份有限公司官网seo是指
  • 如何建立政府网站搭建一个app平台需要多少钱
  • 用shopify 做网站南昌关键词优化软件
  • 做外贸要有英文网站吗网络营销的四大要素
  • pc 移动端网站建设免费下载优化大师
  • python如何建网站建设长沙网动网络科技有限公司
  • 重庆有专业做网站的吗长春seo优化企业网络跃升
  • 烟台企业建站系统模板搜索引擎调价工具哪个好
  • 做网站前需要准备什么百度搜索提交入口
  • 乌鲁木齐网站建设小广告清理
  • 做服装搭配直接售卖的网站seo查询在线
  • 常州化龙巷网站favicon.ico百度站长seo
  • 网约车服务厦门seo关键词优化培训
  • 天津项目网站建设福州网站快速排名提升
  • 企业网站开发丨薇网络营销案例2022
  • 2022中国互联网公司排名上海网站排名seo公司
  • 企业官网下载贵州百度seo整站优化
  • 哪些网站是响应式网站最新域名查询
  • 建设一个国外服务器的网站网站和网页的区别
  • 东莞教育平台网站建设网络推广的网站有哪些
  • 做变态手术视频网站促销方法100种
  • 网站关键词排名下降软文发稿网站
  • 技术支持 昆明网站建设seo作弊
  • wordpress自己安装了插件吗郑州网站建设推广优化