add check refused email method
This commit is contained in:
@@ -60,6 +60,20 @@ class ExcelHelper:
|
||||
contact_list.append(contact)
|
||||
return contact_list
|
||||
|
||||
def check_contact_list(self):
|
||||
contact_list = self.read_contacts()
|
||||
for contact in contact_list:
|
||||
if contact.first_name is None or len(contact.first_name) == 0:
|
||||
print("error in firstName for " + contact.mail)
|
||||
if contact.last_name is None or len(contact.last_name) == 0:
|
||||
print("error in last_name for " + contact.mail)
|
||||
if contact.phone is None or len(contact.phone) == 0:
|
||||
print("error in phone for " + contact.mail)
|
||||
if contact.passport is None or len(contact.passport) == 0:
|
||||
print("error in passport_number for " + contact.mail)
|
||||
if contact.mail is None or len(contact.mail) == 0:
|
||||
print("error in mail for " + contact.phone_number)
|
||||
|
||||
def read_mails_and_pwd(self,
|
||||
file_name='/Users/lpan/Desktop/163.xlsx'):
|
||||
contact_list = []
|
||||
@@ -213,11 +227,12 @@ def save_mails_to_db():
|
||||
|
||||
if __name__ == '__main__':
|
||||
# excel_reader = ExcelHelper()
|
||||
# contacts = excel_reader.read_names("/Users/panlei/Documents/rdv/未注册/500.xlsx")
|
||||
# contacts = excel_reader.read_names("/Users/lpan/Downloads/500_yahoo_12-03-2023.xlsx")
|
||||
# print(contacts)
|
||||
# write_new_contacts_to_excel(valid_contacts=contacts)
|
||||
|
||||
save_mails_to_db()
|
||||
excel_reader = ExcelHelper()
|
||||
excel_reader.check_contact_list()
|
||||
# save_mails_to_db()
|
||||
# for mail in excel_reader.read_mails_and_pwd():
|
||||
# MONGO_STORE_MANAGER.insert_email(mail)
|
||||
# for i in range(1, 64):
|
||||
|
||||
Reference in New Issue
Block a user