mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2025-04-12 16:59:08 +00:00
Added top-level handling
This commit is contained in:
parent
5dd3164966
commit
8f87c50e23
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,8 @@ def dnsmasq(src, out, remove={'google.com'}):
|
|||
if tldextract.extract(line).suffix:
|
||||
if re.search(r'[^а-я\-]', tldextract.extract(line).domain):
|
||||
domains.add(tldextract.extract(line.rstrip()).registered_domain)
|
||||
if not tldextract.extract(line).domain and tldextract.extract(line).suffix:
|
||||
domains.add("." + tldextract.extract(line.rstrip()).suffix)
|
||||
|
||||
domains = domains - remove
|
||||
domains = sorted(domains)
|
||||
|
|
Loading…
Add table
Reference in a new issue