json call rest

import urllib, json
>>> url = "http://maps.googleapis.com/maps/api/geocode/json?address=googleplex&sens..."
>>> url = "http://myexternalip.com/json"
>>> response = urllib.urlopen(url);
>>> data = json.loads(response.read())
>>> print data
{u'ip': u'80.57.121.251'}

Tags: