diff --git a/src/notification/mailer.py b/src/notification/mailer.py index 6914f9c..5b6c6bb 100644 --- a/src/notification/mailer.py +++ b/src/notification/mailer.py @@ -30,7 +30,7 @@ class Mailer: recipients = ['panleicim@gmail.com', 'kamenonly@gmail.com', 'tangliang0411@gmail.com'] else: recipients = ['panleicim@gmail.com'] - + result.phone = result.phone.replace(".0", "") mytemplate = Template(filename=config.ROOT_DIR + "/templates/appointment_results.html") self.logger.info("send email to " + str(recipients)) self.ses_client.send_email( diff --git a/src/pojo/contact_pojo.py b/src/pojo/contact_pojo.py index 7b31530..dbb34fe 100644 --- a/src/pojo/contact_pojo.py +++ b/src/pojo/contact_pojo.py @@ -16,7 +16,7 @@ class ContactPojo: def __init__(self, phone_number: str, passport_number: str, last_name: str, first_name: str, mail: str, ccid: str = "", position: int = 0): - self.phone = phone_number + self.phone = phone_number.replace(".0", "") self.passport = passport_number self.last_name = last_name self.first_name = first_name diff --git a/src/workers/commandor_page.py b/src/workers/commandor_page.py index e2790c9..55de23a 100644 --- a/src/workers/commandor_page.py +++ b/src/workers/commandor_page.py @@ -52,9 +52,10 @@ class CommandorPage: def __init__(self, contact: ContactPojo, store_type=0, proxy_type=ProxyType.BRIGHT_DATA, mode: ModeEnum = ModeEnum.MANUAL, headless=False): self.otp_value = None - self.logger = logging.getLogger("约会页面:" + str(contact.phone)) self.is_finished = False self.contact = contact + self.contact.phone = self.contact.phone.replace(".0", "") # remove the .0 if the Excel format is not correct + self.logger = logging.getLogger("约会页面:" + str(self.contact.phone)) self.proxy_type = proxy_type self.is_event_sent = False self.is_captcha_in_error = False