whois/__init__.py
branchpython3
changeset 73 644d81a7995b
parent 71 b181f795cc0d
child 86 d6fcfa5acc7b
child 97 44522cd37b07
equal deleted inserted replaced
72:26db2c025614 73:644d81a7995b
    59 
    59 
    60     if not isinstance(url, str):
    60     if not isinstance(url, str):
    61         url = url.decode('utf-8')
    61         url = url.decode('utf-8')
    62     url = re.sub(b'^.*://', b'', url.encode('idna')).split(b'/')[0].lower()
    62     url = re.sub(b'^.*://', b'', url.encode('idna')).split(b'/')[0].lower()
    63     domain = []
    63     domain = []
    64     print('url:', url)
       
    65 
    64 
    66     for section in url.split(b'.'):
    65     for section in url.split(b'.'):
    67         if section in suffixes:
    66         if section in suffixes:
    68             domain.append(section)
    67             domain.append(section)
    69         else:
    68         else: