optimize check_results.py and add export contact
This commit is contained in:
@@ -85,9 +85,10 @@ def get_random_phone_numbers():
|
||||
|
||||
|
||||
def generate_email_from_name(first_name: str, last_name: str) -> str:
|
||||
length = 3 # number of characters in the string.
|
||||
length = 4 # number of characters in the string.
|
||||
ran = ''.join(random.choices(string.digits, k=length))
|
||||
email = "{}{}{}@163.com".format(last_name.lower(), first_name.lower(), ran)
|
||||
separator = ['.', '_', '']
|
||||
email = "{}{}{}{}@163.com".format(last_name.lower(), random.choice(separator), first_name.lower(), ran)
|
||||
print(email)
|
||||
return email
|
||||
|
||||
@@ -128,6 +129,6 @@ def write_new_contacts_to_excel(valid_contacts: list):
|
||||
|
||||
if __name__ == '__main__':
|
||||
excel_reader = ExcelHelper()
|
||||
contacts = excel_reader.read_names("new_profile_500.xlsx")
|
||||
contacts = excel_reader.read_names("C:/Users/landd/Desktop/1000.xlsx")
|
||||
print(contacts)
|
||||
# write_new_contacts_to_excel(valid_contacts=contacts)
|
||||
write_new_contacts_to_excel(valid_contacts=contacts)
|
||||
|
||||
@@ -19,7 +19,7 @@ def get_random_id_number() -> str:
|
||||
|
||||
|
||||
def write_the_valid_profiles_to_excel():
|
||||
day_list = ['2022-05-28']
|
||||
day_list = ['2022-05-30']
|
||||
|
||||
collection = []
|
||||
for day in day_list:
|
||||
|
||||
Reference in New Issue
Block a user