def url_get_parent(url):
    """
    http://one/two/three  =>  http://one/two
    http://one            =>  http://one
    """
    index = url.rfind("/")
    if index > 8:           # avoid https://
        return url[0:index]
    else:
        return url