Do You Eat Rice?

2016/08/04

google domain dynamic dns ip 변경 하기

Python 을 이용한 Google Domain Dynamic DNS IP

# -*- coding: utf-8-*-
import requests
print requests.get('https://{username}:{password}@domains.google.com/nic/update?hostname={hostname}&myip={ip}'.format(
        username='##########',
        password='##########',
        hostname='sub.domain.com',
        ip=requests.get('http://ifconfig.co/json').json()['ip']
    )
).text

list of articles