def get_domain(url):
    domain = '{url.netloc}'.format(url=urlparse(url))
    if '.' in domain:
        return domain.split('.')[-2]
    return domain
Get the domain of a URL
dataset/ETHPy150Open huntrar/scrape/scrape/utils.py/get_domain