@with_cached_html_pages
def parse_links(page):
    '\n    Parse an HTML document, and yield its anchor elements as Link objects.\n    '
    document = html5lib.parse(page.content, transport_encoding=page.encoding, namespaceHTMLElements=False)
    url = page.url
    base_url = _determine_base_url(document, url)
    for anchor in document.findall('.//a'):
        link = _create_link_from_element(anchor, page_url=url, base_url=base_url)
        if (link is None):
            continue
        (yield link)
Parse an HTML document, and yield its anchor elements as Link objects.
@with_cached_html_pages
def parse_links(page):
    '\n    \n    '
    document = html5lib.parse(page.content, transport_encoding=page.encoding, namespaceHTMLElements=False)
    url = page.url
    base_url = _determine_base_url(document, url)
    for anchor in document.findall('.//a'):
        link = _create_link_from_element(anchor, page_url=url, base_url=base_url)
        if (link is None):
            continue
        (yield link)