diff --git a/src/download_tracker.py b/src/download_tracker.py index 3804853..629d46f 100755 --- a/src/download_tracker.py +++ b/src/download_tracker.py @@ -135,7 +135,11 @@ def combine_all(changes=['_']): continue # added by exodus, not a tracker per se res.add(dom[::-1]) # reverse for bintree lookup with open(final, 'w') as fp: + prev_dom = '' for domain in sorted(res): + if domain.startswith(prev_dom + '.'): + continue # parent is tracker already + prev_dom = domain fp.write(domain + '\n') diff --git a/src/html_index_domains.py b/src/html_index_domains.py index cf3b058..df80898 100755 --- a/src/html_index_domains.py +++ b/src/html_index_domains.py @@ -65,8 +65,8 @@ def gen_html_top_10(path, subset, total, title): def gen_html_trinity(idx_dir, app_count, json, title, symlink): - list1 = [(dom, len(ids) - 1) for dom, ids in json['subdom'].items()] - list2 = [(dom, len(ids) - 1) for dom, ids in json['pardom'].items()] + list1 = [(dom, len(ids)) for dom, ids in json['subdom'].items()] + list2 = [(dom, len(ids)) for dom, ids in json['pardom'].items()] def write_index(fname, title, button): HTML.write(idx_dir, '

{}

{}{}'.format( @@ -132,6 +132,9 @@ def process(): title='Subdomain Lookup') print(' All Domains') + for key in ['subdom', 'pardom']: + for x in json[key].keys(): + json[key][x] = json[key][x][1:] gen_html_trinity(mylib.path_out('index', 'domains', 'all'), app_count, json=json, title='Requested Domains', symlink=index_domains.fname_all())