Skip to content

Commit 1802519

Browse files
adding email domains txt
1 parent fb0f69d commit 1802519

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
bogusemail.com
2+
planetmail.com
3+
post.com
4+
techie.com
5+
usa.com
6+
writeme.com
7+
workmail.com
8+
myself.com
9+
music.com
10+
mail.com
11+
inmae.com
12+
icqmail.com
13+
hushmail.com
14+
hotmail.com
15+
gmx.com
16+
gmx.net
17+
gmx.at
18+
gmx.de
19+
gmx.ch
20+
asia.com
21+
aol.com
22+
aol.co.uk
23+
aol.de
24+
accountant.com
25+
aim.com

random_profile/main.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
cities_name_txt = os.path.join(ROOT_DIR, "random_profile/assets/cities_name.txt")
2323
states_names_txt = os.path.join(ROOT_DIR, "random_profile/assets/states_names.txt")
2424
job_titles_txt = os.path.join(ROOT_DIR, "random_profile/assets/job_titles.txt")
25+
email_domain_txt = os.path.join(ROOT_DIR, "random_profile/assets/email_domains.txt")
2526

2627
# loading data from txt files
2728
fname = load_txt_file(fname_txt)
@@ -30,6 +31,7 @@
3031
cities_name = load_txt_file(cities_name_txt)
3132
street_names = load_txt_file(street_names_txt)
3233
job_titles = load_txt_file(job_titles_txt)
34+
email_domains = load_txt_file(email_domain_txt)
3335

3436
class RandomProfile:
3537
def __init__(self, num=1):
@@ -57,14 +59,15 @@ def full_name(self):
5759
return full_name_list
5860

5961
def full_profile(self):
60-
# print full profile
6162
profile_list = []
6263
for _ in range(self.num):
6364
first = random.choice(fname)
6465
last = random.choice(lname)
65-
phone = f'+ +1-{random.randint(300, 500)}{random.randint(800, 999)}{random.randint(1000,9999)}'
66+
full_name = first + ' ' + last
67+
phone = f'+ +1-{random.randint(300, 500)}-{random.randint(800, 999)}-{random.randint(1000,9999)}'
6668
job_title = random.choice(job_titles)
6769
ip_address = ipv4_gen()
70+
email_domain = random.choice(email_domains)
6871

6972
street_num = random.randint(100, 999)
7073
street = random.choice(street_names)
@@ -73,11 +76,12 @@ def full_profile(self):
7376
zip_code = random.randint(10000, 99999)
7477

7578
address = f'{street_num} {street} St. {city} {state} {zip_code}'
76-
email = first.lower() + last.lower() + '@bogusemail.com'
79+
email = first.lower() + last.lower() + '@' + email_domain
7780

7881
profile_dict = {}
7982
profile_dict['first_name'] = first
8083
profile_dict['last_name'] = last
84+
profile_dict['full_name'] = full_name
8185
profile_dict['phone'] = phone
8286
profile_dict['address'] = address
8387
profile_dict['email'] = email

0 commit comments

Comments
 (0)