mirror of https://github.com/d3cim/block.git
Update generate-domains-blocklist.py
more "proper" domain sorting....
This commit is contained in:
parent
28f89b1a73
commit
01d6d6f907
|
@ -7,6 +7,8 @@ import argparse
|
|||
import re
|
||||
import sys
|
||||
|
||||
domain_list = []
|
||||
|
||||
try:
|
||||
import urllib2 as urllib
|
||||
|
||||
|
@ -257,7 +259,8 @@ def blocklists_from_config_file(
|
|||
print("# Ignored entries due to the allowlist: {}".format(allowed))
|
||||
list_names = sorted(set(list_names))
|
||||
for name in list_names:
|
||||
print(name)
|
||||
domain_list.append(name)
|
||||
for y in sorted([x.strip().split('.')[::-1] for x in domain_list]): print('.'.join(y[::-1]))
|
||||
|
||||
|
||||
argp = argparse.ArgumentParser(
|
||||
|
|
Loading…
Reference in New Issue