Merge branch 'feature/automatic' into feature/auto_with_checkresults
This commit is contained in:
@@ -26,7 +26,7 @@ REGEX_RDV_URL = "https:\/\/rendezvousparis\.hermes\.com\/client\/register\/[A-Z0
|
||||
otp_value = None
|
||||
OTP_FIELD_ID = "#sms_code"
|
||||
MESSAGE_FIELD_CLASS = ".message"
|
||||
|
||||
BLANK_URL = "about:blank"
|
||||
CONFIRMED_MESSAGE = "Your request for a Leather Goods appointment has been registered"
|
||||
CONFIRMED_MESSAGE_FR = "Votre demande de rendez-vous Maroquinerie a bien été enregistrée et nous vous en remercions."
|
||||
DOUBLE_REQUEST_ERROR_MESSAGE = "A request with the same data has already been validated today."
|
||||
@@ -55,7 +55,7 @@ class CommandorPage:
|
||||
|
||||
def __init__(self, contact: ContactPojo, store_type=0, proxy_type=0, mode: ModeEnum = ModeEnum.MANUAL):
|
||||
self.otp_value = None
|
||||
self.logger = logging.getLogger("CommandorPage:" + str(contact.phone))
|
||||
self.logger = logging.getLogger("约会页面:" + str(contact.phone))
|
||||
self.is_finished = False
|
||||
self.contact = contact
|
||||
self.proxy_type = proxy_type
|
||||
@@ -235,7 +235,9 @@ class CommandorPage:
|
||||
|
||||
def get_errors(self):
|
||||
# send error result
|
||||
self.publish_message_to_queue(self.contact, PublishType.ERROR, self.page.url)
|
||||
if self.page.url != BLANK_URL:
|
||||
# no need to push blank url to db
|
||||
self.publish_message_to_queue(self.contact, PublishType.ERROR, self.page.url)
|
||||
try:
|
||||
items = self.page.query_selector("div.alert")
|
||||
if items:
|
||||
@@ -330,6 +332,7 @@ class CommandorPage:
|
||||
firstName=contact.first_name, lastName=contact.last_name, email=contact.mail,
|
||||
passport=contact.passport, ccid=contact.ccid)
|
||||
result.id = id
|
||||
result.store_type = self.store_type
|
||||
params.firebase_store_manager.save(result)
|
||||
if status is PublishType.SUCCESS:
|
||||
self.on_success(result)
|
||||
|
||||
Reference in New Issue
Block a user