support hotmail.com
This commit is contained in:
@@ -9,4 +9,4 @@ if __name__ == '__main__':
|
||||
print("call validate_all_links()")
|
||||
validate_all_links([])
|
||||
print("wait for 30 seconds")
|
||||
time.sleep(30)
|
||||
time.sleep(10)
|
||||
|
||||
@@ -178,7 +178,7 @@ class MailReader():
|
||||
subject = email_message.get('subject')
|
||||
body = ""
|
||||
hermes_mail_adress = "no-reply@hermes.com"
|
||||
if hermes_mail_adress in from_address or "outlook.com" in from_address:
|
||||
if hermes_mail_adress in from_address or "outlook.com" in from_address or "hotmail" in from_address:
|
||||
for part in email_message.walk():
|
||||
print(part.get_content_type())
|
||||
if part.get_content_type() == "text/html":
|
||||
@@ -192,7 +192,7 @@ class MailReader():
|
||||
print("body is {}".format(body))
|
||||
print("subject is {}".format(subject))
|
||||
if len(mail.to_address) == 0:
|
||||
if "outlook.com" in from_address:
|
||||
if "outlook.com" in from_address or "hotmail.com" in from_address:
|
||||
# it is a transferred email
|
||||
mail.to_address = extract_email_from_from_address(from_address)
|
||||
else:
|
||||
@@ -275,20 +275,12 @@ if __name__ == '__main__':
|
||||
# mail_address1 = MailAddress(mail="tinagonzales685585@aol.com", password="yhihvdkrbxnksema")
|
||||
# mail_list = [mail_address1]
|
||||
contact_to_book_list = read_contacts(
|
||||
# file_name="/Users/lpan/Desktop/contact_list_2025-01-16_yahoo_100.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/extracted_yahoo_contacts_129_24_03_win.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/contact_list_2025-04-02.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/17_18_04_to_test_win.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/real_name_contacts_200_aol_win.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/real_name_contacts_200_aol_mac.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/real_name_contacts_500_27_03_25_fixed_mac.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/contact_list_2025-04-05.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/real_name_contacts_400_aol_mac.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/contact_list_2025-04-07.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/contact_list_2025-04-05.xlsx")
|
||||
# file_name="/Users/rdv/Desktop/contact_list_not_used_contacts.xlsx")
|
||||
# file_name="/Users/lpan/Desktop/contact_list_not_used_contacts.xlsx")
|
||||
file_name="/Users/lpan/Desktop/contact_list_2025-06-12.xlsx")
|
||||
# file_name="/Users/rdv/Desktop/real_name_contacts_100_hotmail.xlsx")
|
||||
file_name="/Users/rdv/Desktop/contact_list_2025-06-23.xlsx")
|
||||
# file_name="/Users/rdv/Desktop/contact_list_all_studio.xlsx")
|
||||
# file_name="/Users/rdv/Desktop/contact_list_all_studo_gmx_us.xlsx")
|
||||
# file_name="/Users/rdv/Desktop/contact_list_2025-05-24.xlsx")
|
||||
all_mail_list = MONGO_STORE_MANAGER.get_destination_emails()
|
||||
mail_list_to_check = []
|
||||
|
||||
@@ -19,7 +19,7 @@ from utils.AppLogging import init_logger
|
||||
from utils.user_agent_helper import generate_headers_from_request_message
|
||||
|
||||
DOUBLE_MESSAGE = "Une demande de rendez-vous a déjà été enregistrée avec ces coordonnées"
|
||||
INVALID = "Depuis plus de 130 ans,"
|
||||
INVALID = "nos conseillers vous accueillent sur rendez-vous dans nos magasins"
|
||||
|
||||
init_logger()
|
||||
logger = logging.getLogger()
|
||||
@@ -219,7 +219,7 @@ def validate_all_links(_contact_serial_list):
|
||||
# get the first 50 links
|
||||
if len(link_to_validated) == 0:
|
||||
return
|
||||
divided = 2
|
||||
divided = 1
|
||||
# default_segment_number = 20
|
||||
_first_25_percent_links = link_to_validated[0:(int(len(all_link_list) / divided))]
|
||||
_first_25_percent_links = all_link_list
|
||||
@@ -234,6 +234,9 @@ def validate_all_links(_contact_serial_list):
|
||||
# else:
|
||||
# _segment_number = 1
|
||||
_thread_list = []
|
||||
if len(_first_25_percent_links) >=3:
|
||||
_segment_number = 3
|
||||
else:
|
||||
_segment_number = 1
|
||||
for i in range(0, _segment_number):
|
||||
logger.info("{}:{} links to validate".format(threading.currentThread().name, len(_first_25_percent_links)))
|
||||
|
||||
Reference in New Issue
Block a user