equal
deleted
inserted
replaced
43 """ |
43 """ |
44 if re.match(r'\d+\.\d+\.\d+\.\d+', url): |
44 if re.match(r'\d+\.\d+\.\d+\.\d+', url): |
45 # this is an IP address |
45 # this is an IP address |
46 return socket.gethostbyaddr(url)[0] |
46 return socket.gethostbyaddr(url)[0] |
47 |
47 |
48 tlds_path = os.path.join(os.getcwd(), os.path.dirname(__file__), 'tlds.txt') |
48 tlds_path = os.path.join(os.getcwd(), os.path.dirname(__file__), 'data', 'tlds.txt') |
49 suffixes = [ |
49 suffixes = [ |
50 line.lower().strip() |
50 line.lower().strip() |
51 for line in open(tlds_path).readlines() |
51 for line in open(tlds_path).readlines() |
52 if not line.startswith('#') |
52 if not line.startswith('#') |
53 ] |
53 ] |