def _create_link_from_element(anchor, page_url, base_url):
    '\n    Convert an anchor element in a simple repository page to a Link.\n    '
    href = anchor.get('href')
    if (not href):
        return None
    url = _clean_link(urllib_parse.urljoin(base_url, href))
    pyrequire = anchor.get('data-requires-python')
    pyrequire = (unescape(pyrequire) if pyrequire else None)
    yanked_reason = anchor.get('data-yanked')
    if yanked_reason:
        yanked_reason = unescape(yanked_reason)
    link = Link(url, comes_from=page_url, requires_python=pyrequire, yanked_reason=yanked_reason)
    return link
Convert an anchor element in a simple repository page to a Link.
def _create_link_from_element(anchor, page_url, base_url):
    '\n    \n    '
    href = anchor.get('href')
    if (not href):
        return None
    url = _clean_link(urllib_parse.urljoin(base_url, href))
    pyrequire = anchor.get('data-requires-python')
    pyrequire = (unescape(pyrequire) if pyrequire else None)
    yanked_reason = anchor.get('data-yanked')
    if yanked_reason:
        yanked_reason = unescape(yanked_reason)
    link = Link(url, comes_from=page_url, requires_python=pyrequire, yanked_reason=yanked_reason)
    return link