def excise_elements(soup, css_selectors=()):
    """
    For each css selector, get rid of them while preserving their children.
    E.g., if the css selector is "span":
        <p>Exact science based on <b><span><em><span>Cubics</span></em></span></b>,
        not on <span>theories</span>. Wisdom is Cubic testing of knowledge.</p>
    becomes
        <p>Exact science based on <b><em>Cubics</em></b>,
        not on theories. Wisdom is Cubic testing of knowledge.</p>
    inspired by: https://stackoverflow.com/questions/1765848/remove-a-tag-using-beautifulsoup-but-keep-its-contents
    """

    def depth(node):
        if node is None:
            return 0
        return 1 + depth(node.parent)

    for selector in css_selectors:
        for tag in sorted(soup.select(selector), reverse=True, key=depth):
            if getattr(tag, "parent", None):
                while len(tag.contents) > 0:
                    c = tag.contents[0]
                    tag.insert_before(c)
                tag.extract()

    return soup