from bs4 import BeautifulSoup


def get_plaintext(html):
    """Scrub out tags and extract plaintext"""

    soup = BeautifulSoup(html)
    for script in soup(["script", "style"]):
        script.extract()
    return soup.get_text()