Bundle name index
This commit is contained in:
@@ -6,6 +6,13 @@ import common_lib as mylib
|
||||
known_trackers = None
|
||||
|
||||
|
||||
def is_tracker(domain):
|
||||
global known_trackers
|
||||
if not known_trackers:
|
||||
known_trackers = mylib.read_list('tracker_all.txt')
|
||||
return mylib.bintree_lookup(known_trackers, domain[::-1])
|
||||
|
||||
|
||||
# def md5(fname):
|
||||
# hash_md5 = hashlib.md5()
|
||||
# with open(fname, 'rb') as f:
|
||||
@@ -110,13 +117,6 @@ def exodus(fname):
|
||||
return save_list(res, fname, binary=False)
|
||||
|
||||
|
||||
def is_tracker(domain):
|
||||
global known_trackers
|
||||
if not known_trackers:
|
||||
known_trackers = mylib.read_list('tracker_all.txt')
|
||||
return mylib.bintree_lookup(known_trackers, domain[::-1])
|
||||
|
||||
|
||||
def combine_all(changes):
|
||||
final = mylib.path_root('src', 'lists', 'tracker_all.txt')
|
||||
if changes or not mylib.file_exists(final):
|
||||
|
||||
Reference in New Issue
Block a user