

def geocode(self, string, exactly_one=True):
    if isinstance(string, unicode):
        string = string.encode('utf-8')
    params = {
        'q': (self.format_string % string),
    }
    url = (self.url % urlencode(params))
    logger.debug(('Fetching %s...' % url))
    page = urlopen(url)
    return self.parse_json(page, exactly_one)

dataset/ETHPy150Open sahana/eden/modules/geopy/geocoders/openmapquest.py OpenMapQuest.geocode/original