def _generate_url (ip_address, get_latlong=True):

    url_parts = ['http://api.hostip.info/get_html.php?']

    if get_latlong:
        url_parts.append('position=true&')

    url_parts.append('ip=')
    url_parts.append(ip_address)

    return ''.join(url_parts)
Generate and return the url used to call the geolocation API
dataset/ETHPy150Open dpapathanasiou/intelligent-smtp-responder/utils/geolocator.py/_generate_url