Created
May 25, 2016 18:15
-
-
Save andreagrandi/a5dee1f85573821cbefade8933142cd1 to your computer and use it in GitHub Desktop.
Merge Jason Cartwright spammer list with spammy-recruiters one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
spammy_recruiters = [] | |
jason_recruiters = [] | |
with open('spammers.txt', 'r') as f: | |
spammers = f.readlines() | |
for domain in spammers: | |
spammy_recruiters.append(domain.replace(' OR \n', '').replace('\n', '')) | |
with open('spammers-jason.txt') as f: | |
spammers = f.readlines() | |
for domain in spammers: | |
jason_recruiters.append('@{0}'.format(domain.replace('\n', ''))) | |
unified_list = sorted(list(set(spammy_recruiters + jason_recruiters))) | |
with open('spammers-andrea.txt', 'w') as f: | |
for domain in unified_list[:-1]: | |
f.write('{0} OR \n'.format(domain)) | |
f.write('{0}\n'.format(unified_list[-1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment