limoxi / aliyun_ddns

基于阿里云解析的动态域名解析
MIT License
108 stars 51 forks source link

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

Closed fireicewater closed 2 years ago

fireicewater commented 5 years ago

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