filter outlook and hotmail mails
This commit is contained in:
@@ -97,7 +97,7 @@ def write_new_contacts_to_excel(valid_contacts: list, file_name=str(datetime.dat
|
|||||||
|
|
||||||
|
|
||||||
def generate_valid_contact_list_for_day(segment_number=1):
|
def generate_valid_contact_list_for_day(segment_number=1):
|
||||||
_collection_name = "2025-06-07"
|
_collection_name = "2025-08-14"
|
||||||
_valid_contact_list = MONGO_STORE_MANAGER.get_all_successful_items_for_one_day(_collection_name)
|
_valid_contact_list = MONGO_STORE_MANAGER.get_all_successful_items_for_one_day(_collection_name)
|
||||||
_all_contacts = MONGO_STORE_MANAGER.get_all_contacts_to_book()
|
_all_contacts = MONGO_STORE_MANAGER.get_all_contacts_to_book()
|
||||||
_contact_to_save = []
|
_contact_to_save = []
|
||||||
@@ -120,6 +120,9 @@ def generate_valid_contact_list_for_day(segment_number=1):
|
|||||||
|
|
||||||
if _contact.url_validated:
|
if _contact.url_validated:
|
||||||
if _contact.last_name is not None and len(_contact.last_name) > 0:
|
if _contact.last_name is not None and len(_contact.last_name) > 0:
|
||||||
|
if "outlook.com" in _contact.mail or "hotmail.com" in _contact.mail:
|
||||||
|
_need_to_save = False
|
||||||
|
else:
|
||||||
_need_to_save = True
|
_need_to_save = True
|
||||||
# remove the duplicated items
|
# remove the duplicated items
|
||||||
for _added_item in _contact_to_save:
|
for _added_item in _contact_to_save:
|
||||||
|
|||||||
Reference in New Issue
Block a user