def split_address(address):
    """Splits a url into a protocol, host name and port"""
    if '://' in address:
        protocol, address = address.split('://')
    else:
        protocol = 'http'
    if ':' in address:
        address, port = address.split(':')
    else:
        port = 443 if protocol == 'https' else 8000
    return protocol, address, int(port)
