def get_linkresolver_url_by_ip(request, citation):

    worldcat_registry = "http://www.worldcat.org/registry/lookup?IP={ip}"
    worldcat_tag = "{http://worldcatlibraries.org/registry/resolver}"


    user_ip = get_real_ip(request)
    # user_ip = "149.169.132.43"
    response = urlopen(worldcat_registry.format(ip=user_ip)).read()

    root = ET.fromstring(response)
    resolver = root.find('.//' + worldcat_tag + 'resolver')

    if resolver:
        url = build_openurl(resolver.find(worldcat_tag + 'baseURL').text.strip(), citation)
        linkIcon = resolver.find(worldcat_tag + 'linkIcon').text.strip()
        linkText = resolver.find(worldcat_tag + 'linkText').text.strip()
        return {
            'url': url,
            'icon': linkIcon,
            'text': linkText,
        }
    return
Use the WorldCat registry API to get the appropriate OpenURL resolver for
dataset/ETHPy150Open upconsulting/IsisCB/isiscb/isisdata/views.py/get_linkresolver_url_by_ip