def find_external_links(url, page):

    for match in REL.finditer(page):
        tag, rel = match.groups()
        rels = map(str.strip, rel.lower().split(','))
        if 'homepage' in rels or 'download' in rels:
            for match in HREF.finditer(tag):
                yield urlparse.urljoin(url, htmldecode(match.group(1)))

    for tag in ("<th>Home Page", "<th>Download URL"):
        pos = page.find(tag)
        if pos!=-1:
            match = HREF.search(page,pos)
            if match:
                yield urlparse.urljoin(url, htmldecode(match.group(1)))
Find rel="homepage" and rel="download" links in `page`, yielding URLs
dataset/ETHPy150Open balanced/status.balancedpayments.com/venv/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/setuptools/package_index.py/find_external_links