Merge remote-tracking branch 'origin/feature/auto_with_checkresults' into feature/auto_with_checkresults
This commit is contained in:
@@ -7,8 +7,9 @@ import xlsxwriter
|
||||
|
||||
from definitions import CONTACT_LIST_FILE
|
||||
from pojo.contact_pojo import ContactPojo
|
||||
from utils.generate_random_passport_id import get_random_passport_id_number
|
||||
|
||||
phone_number_prefix = ['6', '7']
|
||||
phone_number_prefix = ['6']
|
||||
|
||||
|
||||
class ExcelHelper:
|
||||
@@ -122,7 +123,7 @@ def write_new_contacts_to_excel(valid_contacts: list):
|
||||
row = row + 1
|
||||
for info in valid_contacts:
|
||||
info.phone = get_random_phone_numbers()
|
||||
info.passport = get_random_id_number()
|
||||
info.passport = get_random_passport_id_number()
|
||||
info.mail = generate_email_from_name(info.first_name, info.last_name)
|
||||
# Iterate over the data and write it out row by row.
|
||||
worksheet.write(row, col, "{} {}".format(info.last_name, info.first_name))
|
||||
@@ -135,6 +136,6 @@ def write_new_contacts_to_excel(valid_contacts: list):
|
||||
|
||||
if __name__ == '__main__':
|
||||
excel_reader = ExcelHelper()
|
||||
contacts = excel_reader.read_names("C:/Users/landd/Downloads/names.xlsx")
|
||||
contacts = excel_reader.read_names("C:/Users/landd/Desktop/rdv/08-06/500.xlsx")
|
||||
print(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-30']
|
||||
day_list = ['2022-06-02']
|
||||
|
||||
collection = []
|
||||
for day in day_list:
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import random
|
||||
import string
|
||||
|
||||
|
||||
# letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'P', 'Q', 'R', 'S', 'T', '1', '2', '3', '4', '5', '6', '7',
|
||||
# '8', '9']
|
||||
from pojo.captcha_error_contact_pojo import ContactInErrorPojo
|
||||
from pojo.contact_pojo import ContactPojo
|
||||
|
||||
letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'P', 'Q', 'R', 'S', 'T', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9']
|
||||
letters = ['E', 'G', 'M']
|
||||
|
||||
|
||||
def get_random_id_number() -> str:
|
||||
@@ -14,11 +16,11 @@ def get_random_id_number() -> str:
|
||||
id_number = str(ran)
|
||||
return id_number
|
||||
|
||||
|
||||
# 产生中国护照号
|
||||
def get_random_passport_id_number() -> str:
|
||||
S = 7 # number of characters in the string.
|
||||
S = 8 # number of characters in the string.
|
||||
ran = ''.join(random.choices(string.digits, k=S))
|
||||
id_number = "E" + random.choice(letters) + str(ran)
|
||||
id_number = random.choice(letters) + str(ran)
|
||||
return id_number
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ def generate_names() -> list:
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
for i in range(0, 5):
|
||||
for i in range(0, 500):
|
||||
names = generate_names()
|
||||
for name in names:
|
||||
print(name)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user