Skip to content

Commit

Permalink
add get emails script
Browse files Browse the repository at this point in the history
  • Loading branch information
ouiliame committed Jan 19, 2021
1 parent d024d11 commit faad13a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions get_emails.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import re
import glob

EMAIL_REGEX = re.compile(r'[a-z0-9]+[\._]?[a-z0-9]+[@]\w+[.]\w{2,3}')

files = glob.glob('*/*/*.json')

emails = []

for f in files:
with open(f) as contents:
for email in EMAIL_REGEX.findall(contents.read()):
emails.append(email)

print(", ".join(sorted(set(emails))))

0 comments on commit faad13a

Please sign in to comment.