mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-01-25 16:11:10 +03:00
Added top-level handling
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user