|
|
|
|
|
by jjguy
5590 days ago
|
|
That's clever and useful. Thanks. I've used http://checkip.dyndns.org for this problem for years, but this is an improvement. Checkip: >>> url = urllib2.urlopen("http://checkip.dyndns.org")
>>> url.read()
'<html><head><title>Current IP Check</title></head><body>Current IP Address: 192.168.0.1</body></html>\r\n'
Details here: http://www.dyndns.com/developers/checkip.htmlIt's not as easy to parse as JSON, but nor is it very difficult. The format has not changed in years; I've got a regex running I haven't needed to adjust since day 1. |
|
Documented here: http://dnsomatic.com/wiki/api#detecting_changes