示例#1
0
def make_html_element(html: str, url=DEFAULT_URL) -> Element:
    pq_element = PyQuery(html)[
        0]  # PyQuery is a list, so we take the first element
    return Element(element=pq_element, url=url)
def make_html_element(html: str, url=DEFAULT_URL) -> Element:
    html = remove_control_characters(html)
    pq_element = PyQuery(html)[0]  # PyQuery is a list, so we take the first element
    return Element(element=pq_element, url=url)