def _parse_description(details):
    """
    Parse description of the book.

    Args:
        details (obj): HTMLElement containing slice of the page with details.

    Returns:
        str/None: Details as string with currency or None if not found.
    """
    description = details.find("div", {"class": "detailPopis"})

    # description not found
    if not description:
        return None

    # remove links to ebook version
    ekniha = description[0].find("div", {"class": "ekniha"})
    if ekniha:
        ekniha[0].replaceWith(dhtmlparser.HTMLElement(""))

    # remove links to other books from same cathegory
    detail = description[0].find("p", {"class": "detailKat"})
    if detail:
        detail[0].replaceWith(dhtmlparser.HTMLElement(""))

    # remove all HTML elements
    description = dhtmlparser.removeTags(description[0]).strip()

    # description is blank
    if not description:
        return None

    return description
def _parse_description ( details ) : description = details . find ( "div" , { "class" : "detailPopis" } ) if not description : return None ekniha = description [ 0 ] . find ( "div" , { "class" : "ekniha" } ) if ekniha : ekniha [ 0 ] . replaceWith ( dhtmlparser . HTMLElement ( "" ) ) detail = description [ 0 ] . find ( "p" , { "class" : "detailKat" } ) if detail : detail [ 0 ] . replaceWith ( dhtmlparser . HTMLElement ( "" ) ) description = dhtmlparser . removeTags ( description [ 0 ] ) . strip ( ) if not description : return None return description
Parse description of the book.

    Args:
        details (obj): HTMLElement containing slice of the page with details.

    Returns:
        str/None: Details as string with currency or None if not found.