def _clean_name(name: str) -> str:
    if name.startswith(('http://', 'https://')):
        name = name.split('/', maxsplit=3)[(- 1)]
    else:
        name = name.split('/')[(- 1)]
    return re.sub('\\W|^(?=\\d)-', '_', name)
def _clean_name(name: str) -> str:
    if name.startswith(('http://', 'https://')):
        name = name.split('/', maxsplit=3)[(- 1)]
    else:
        name = name.split('/')[(- 1)]
    return re.sub('\\W|^(?=\\d)-', '_', name)