1
0
mirror of https://github.com/minoplhy/filters-maker.git synced 2024-12-22 10:08:11 +00:00

crawler : additional filtering

This commit is contained in:
minoplhy 2022-04-27 23:04:01 +07:00
parent e833892f79
commit 160c116ff1
Signed by: minoplhy
GPG Key ID: 90667A59A9908AEC

View File

@ -134,6 +134,15 @@ def filteringcon(filters_regex_one):
print('dnsmasq filtering Operation Completed!')
f.close()
with open(filters_regex_one) as f:
file = f.read().split('\n')
for i in range(len(file)):
file[i] = re.sub('^\.', '', file[i])
with open(filters_regex_one, 'w') as f1:
f1.writelines(["%s\n" % item for item in file])
print('additional filtering Operation Completed!')
f.close()
remove_words = ['localhost','localhost.localdomain','local','broadcasthost','loopback','ip6-localnet','ip6-mcastprefix','ip6-allnodes','ip6-allrouters','ip6-allhosts','ip6-loopback',' CNAME rpz-passthru.']
with open(filters_regex_one, 'r') as f: