from bs4 import BeautifulSoup


def _extract_names(html):
    """Extracts the names of the directories from an export page HTML code"""
    soup = BeautifulSoup(html, features="html.parser")
    links = [a.get("href") for a in soup.find_all("a") if soup]

    return [lk[:-1] for lk in links if lk[:-1].isalpha()]