def get_latlng(address):
    address_query = urllib.quote(address, '')
    
    values = {
        'format' : 'json',
        'sensor' : 'false',
        'address' : address_query,
    }
    url = GOOGLE_GEOCODING_API_GEOCODE_URL % values
    response = requests.get(url)
    data = json.loads(response.text)
    try:
        location = data['results'][0]['geometry']['location']
        latitude = location['lat']
        longitude = location['lng']
    except __HOLE__, k:
        latitude = None
        longitude = None
    return (latitude, longitude,)
dataset/ETHPy150Open hacktoolkit/hacktoolkit/apis/google/geocode/geocode.py/get_latlng