force to remove .0 when excel format is not correct

This commit is contained in:
2022-08-10 22:01:36 +02:00
parent f780834d88
commit 0401f7ac1d
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ class Mailer:
recipients = ['panleicim@gmail.com', 'kamenonly@gmail.com', 'tangliang0411@gmail.com'] recipients = ['panleicim@gmail.com', 'kamenonly@gmail.com', 'tangliang0411@gmail.com']
else: else:
recipients = ['panleicim@gmail.com'] recipients = ['panleicim@gmail.com']
result.phone = result.phone.replace(".0", "")
mytemplate = Template(filename=config.ROOT_DIR + "/templates/appointment_results.html") mytemplate = Template(filename=config.ROOT_DIR + "/templates/appointment_results.html")
self.logger.info("send email to " + str(recipients)) self.logger.info("send email to " + str(recipients))
self.ses_client.send_email( self.ses_client.send_email(
+1 -1
View File
@@ -16,7 +16,7 @@ class ContactPojo:
def __init__(self, phone_number: str, passport_number: str, last_name: str, first_name: str, mail: str, def __init__(self, phone_number: str, passport_number: str, last_name: str, first_name: str, mail: str,
ccid: str = "", ccid: str = "",
position: int = 0): position: int = 0):
self.phone = phone_number self.phone = phone_number.replace(".0", "")
self.passport = passport_number self.passport = passport_number
self.last_name = last_name self.last_name = last_name
self.first_name = first_name self.first_name = first_name
+2 -1
View File
@@ -52,9 +52,10 @@ class CommandorPage:
def __init__(self, contact: ContactPojo, store_type=0, proxy_type=ProxyType.BRIGHT_DATA, def __init__(self, contact: ContactPojo, store_type=0, proxy_type=ProxyType.BRIGHT_DATA,
mode: ModeEnum = ModeEnum.MANUAL, headless=False): mode: ModeEnum = ModeEnum.MANUAL, headless=False):
self.otp_value = None self.otp_value = None
self.logger = logging.getLogger("约会页面:" + str(contact.phone))
self.is_finished = False self.is_finished = False
self.contact = contact 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.proxy_type = proxy_type
self.is_event_sent = False self.is_event_sent = False
self.is_captcha_in_error = False self.is_captcha_in_error = False