def beautify_url(url):
    """
    Remove the URL protocol and if it is only a hostname also the final '/'
    """
    try:
        ix = url.index('://')
    except ValueError:
        pass
    else:
        url = url[ix+3:]
    if url.endswith('/') and url.index('/') == len(url)-1:
        url = url[:-1]
    return url