Giter Site home page Giter Site logo

aliyun_ddns's Introduction

Hi 👋

aliyun_ddns's People

Contributors

aixiang avatar limoxi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aliyun_ddns's Issues

requests.get(REQUEST_URL, get_params) 这句遇到错误

requests.get(REQUEST_URL, get_params) 这句遇到:

Traceback (most recent call last):
  File "aliyun_ddns.py", line 123, in 
    update_yun(ip)
  File "aliyun_ddns.py", line 76, in update_yun
    get_resp = requests.get(REQUEST_URL, get_params)
TypeError: get() takes exactly 1 argument (2 given)

REQUEST_URL: https://alidns.aliyuncs.com/
get_params: {'SignatureVersion': '1.0', 'DomainName': u'xxx', 'Timestamp': 'xxx', 'Format': 'json', 'SignatureMethod': 'HMAC-SHA1', 'AccessKeyId': u'xxx', 'TypeKeyWord': 'A', 'Version': '2015-01-09', 'Signature': 'xxx', 'Action': 'DescribeDomainRecords', 'SignatureNonce': UUID('xxx')}

这报错是什么原因

update remote record...
get_records============
{u'Code': u'Forbidden.RAM', u'Message': u"User not authorized to operate on the specified resource, or this API doesn't support RAM.", u'HostId': u'alidns.aliyuncs.com', u'RequestId': u'3AFE62CC-8458-46C7-811A-BA0B60299256'}
Traceback (most recent call last):
File "aliyun_ddns.py", line 124, in
update_yun(ip)
File "aliyun_ddns.py", line 78, in update_yun
for record in records['DomainRecords']['Record']:
KeyError: 'DomainRecords'

百度的ip解析没了,需要更换一下ip解析地址

rt:
我修改了一下解析的地址,修改get_curr_ip 方法如下

def get_curr_ip():
        headers = {
                'content-type': 'text/html',
                'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0'
        }
        resp = requests.get('http://ip.tool.chinaz.com/', headers=headers)
        soup = BS(resp.content, 'html.parser')
        return soup.select('.fz24')[0].string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.