This will clean up the url so that it is in the form:
            https://<SUB_DOMAIN>.eagleeyenetworks.com/
        :param url: str of the url
        :return: str of the clean base url

def clean_base_uri(url):
        """
        This will clean up the url so that it is in the form:
            https://<SUB_DOMAIN>.eagleeyenetworks.com/
        :param url: str of the url
        :return: str of the clean base url
        """
        if url is None:
            return url
        if not '//' in url:
            url = 'https://' + url

        ret = url[:url.find('/', url.find('//') + 2) + 1] or url
        assert '.' in url, "<%s> is not a proper base_uri" % ret

        if not ret.endswith('/'):
            ret += '/'
        return ret