diff options
| author | bicker <bickerkards@gmail.com> | 2017-06-14 14:34:17 +0200 |
|---|---|---|
| committer | bicker <bickerkards@gmail.com> | 2017-06-14 14:34:17 +0200 |
| commit | 9a3b2702bbcbd67eab592b043b7dcd50b48afe3b (patch) | |
| tree | 36738aecfc47f3ace6e29f1d5ec724b1a4d8e92a /backup/old/combine.py | |
first commit
Diffstat (limited to 'backup/old/combine.py')
| -rw-r--r-- | backup/old/combine.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/backup/old/combine.py b/backup/old/combine.py new file mode 100644 index 0000000..4128ade --- /dev/null +++ b/backup/old/combine.py @@ -0,0 +1,27 @@ +import json +from pprint import pprint +from sortedcontainers import SortedDict + +f = open('list02', 'r') +d = {} + +f2 = open('output', 'r') +d2 = SortedDict(json.loads(f2.read())) + +for line in f.readlines(): + tmp = line.strip('\n').split('|') + + if len(tmp) == 3: + if tmp[1].strip(' ') in d: + if d[tmp[1].strip(' ')] != (tmp[0].strip(' '), tmp[2].strip(' ')): + # print d[tmp[1].strip(' ')], (tmp[0].strip(' '), tmp[2].strip(' ')) + print tmp[1].strip(' '), tmp[0].strip(' ') + + d[tmp[1].strip(' ')] = (tmp[0].strip(' '), tmp[2].strip(' ')) + +# for tld in d2: +# for host in d2[tld]: +# print tld, d[d2[tld][host][0]][1] +# +# for i in d: +# print d[i] |