parse url for domain and homepage

    :param url: the req url
    :type url: str
    :return: (homepage, domain)
    :rtype:

def get_domain_home_from_url(url):
    """ parse url for domain and homepage

    :param url: the req url
    :type url: str
    :return: (homepage, domain)
    :rtype:
    """
    p = parse.urlparse(url)
    if p.netloc:
        return '{}://{}'.format(p.scheme, p.netloc), p.netloc
    else:
        return '', ''