whois/__init__.py
changeset 124 dfa8657bdefc
parent 123 03c72d0d1182
child 136 30259bf0523f
equal deleted inserted replaced
123:03c72d0d1182 124:dfa8657bdefc
    57     webscraping.com
    57     webscraping.com
    58     >>> print(extract_domain('198.252.206.140'))
    58     >>> print(extract_domain('198.252.206.140'))
    59     stackoverflow.com
    59     stackoverflow.com
    60     >>> print(extract_domain('102.112.2O7.net'))
    60     >>> print(extract_domain('102.112.2O7.net'))
    61     2o7.net
    61     2o7.net
       
    62     >>> print(extract_domain('globoesporte.globo.com'))
       
    63     globo.com
    62     >>> print(extract_domain('1-0-1-1-1-0-1-1-1-1-1-1-1-.0-0-0-0-0-0-0-0-0-0-0-0-0-10-0-0-0-0-0-0-0-0-0-0-0-0-0.info'))
    64     >>> print(extract_domain('1-0-1-1-1-0-1-1-1-1-1-1-1-.0-0-0-0-0-0-0-0-0-0-0-0-0-10-0-0-0-0-0-0-0-0-0-0-0-0-0.info'))
    63     0-0-0-0-0-0-0-0-0-0-0-0-0-10-0-0-0-0-0-0-0-0-0-0-0-0-0.info
    65     0-0-0-0-0-0-0-0-0-0-0-0-0-10-0-0-0-0-0-0-0-0-0-0-0-0-0.info
    64     """
    66     """
    65     if re.match(r'\d+\.\d+\.\d+\.\d+', url):
    67     if re.match(r'\d+\.\d+\.\d+\.\d+', url):
    66         # this is an IP address
    68         # this is an IP address