do not read email for successful requests
This commit is contained in:
@@ -101,7 +101,7 @@ class CaptchaResultGetter:
|
||||
return None
|
||||
|
||||
def get_ch_raw_data_from_js_data(self, js_data: JsDataPojo, old_valid_cookie) -> str:
|
||||
_tag_version = "4.24.3"
|
||||
_tag_version = "4.25.0"
|
||||
_raw_data = "jsData={}&eventCounters=%5B%5D&jsType=ch&cid={}&ddk=789361B674144528D0B7EE76B35826&Referer=https%253A%252F%252Frendezvousparis.hermes.com%252Fclient%252Fregister&request=%252Fclient%252Fregister&responsePage=origin&ddv={}".format(
|
||||
js_data.to_url_encoded_json(), old_valid_cookie, _tag_version)
|
||||
print("raw data is " + _raw_data)
|
||||
@@ -168,7 +168,7 @@ class CaptchaResultGetter:
|
||||
# _le_js_raw_data = self.get_le_raw_data_from_js_data(js_le_type_data=js_le_type_data,
|
||||
# old_valid_cookie=old_valid_cookie)
|
||||
_cid = get_datadome_cookies(old_valid_cookie)
|
||||
_raw_data = "jsData={}&eventCounters=%7B%22mousemove%22%3A{}%2C%22click%22%3A{}%2C%22scroll%22%3A{}%2C%22touchstart%22%3A{}%2C%22touchend%22%3A{}%2C%22touchmove%22%3A{}%2C%22keydown%22%3A{}%2C%22keyup%22%3A{}%7D&jsType=le&cid={}&ddk=789361B674144528D0B7EE76B35826&Referer=https%253A%252F%252Frendezvousparis.hermes.com%252Fclient%252Fregister&request=%252Fclient%252Fregister&responsePage=origin&ddv=4.24.3".format(
|
||||
_raw_data = "jsData={}&eventCounters=%7B%22mousemove%22%3A{}%2C%22click%22%3A{}%2C%22scroll%22%3A{}%2C%22touchstart%22%3A{}%2C%22touchend%22%3A{}%2C%22touchmove%22%3A{}%2C%22keydown%22%3A{}%2C%22keyup%22%3A{}%7D&jsType=le&cid={}&ddk=789361B674144528D0B7EE76B35826&Referer=https%253A%252F%252Frendezvousparis.hermes.com%252Fclient%252Fregister&request=%252Fclient%252Fregister&responsePage=origin&ddv=4.25.0".format(
|
||||
js_le_type_data.to_url_encoded_json(), mousemove_count, click_count, scroll_count, touch_count, touch_count,
|
||||
touch_move,
|
||||
key_count,
|
||||
|
||||
@@ -72,7 +72,4 @@ DE_PROXY_RES = {
|
||||
# PROXY_LIST_FR = [FR_PROXY_MOBILE_2, FR_PROXY_MOBILE, FR_PROXY_RES, FR_PROXY_RES_4, FR_PROXY_RES_2]
|
||||
# PROXY_LIST_FR = [FR_PROXY_RES_OXY, FR_PROXY_MOBILE_3]
|
||||
PROXY_LIST_FR = [FR_PROXY_MOB_OXY]
|
||||
MOBILE_PROXY_LIST_FR = [FR_PROXY_MOB_OXY_STICKY]
|
||||
# PROXY_LIST = [FR_PROXY_MOBILE, FR_
|
||||
# PROXY_RES]
|
||||
PROXY_LIST_DE = [DE_PROXY_RES, DE_PROXY_MOBILE]
|
||||
MOBILE_PROXY_LIST_FR = [FR_PROXY_MOB_OXY]
|
||||
|
||||
+10
-4
@@ -28,7 +28,7 @@ class Sender:
|
||||
self.proxy_to_use = proxy_to_use
|
||||
self.cookie.load(self.cookie_str)
|
||||
|
||||
def publish_message_to_queue(self, contact: ContactPojo, status: PublishType, url: str):
|
||||
def publish_message_to_queue(self, contact: ContactPojo, status: PublishType, url: str, store_type: str):
|
||||
# create the message
|
||||
if url == "https://rendezvousparis.hermes.com/client/welcome":
|
||||
return
|
||||
@@ -37,7 +37,7 @@ class Sender:
|
||||
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
|
||||
result.store_type = store_type
|
||||
result.created_at = time.strftime("%H:%M:%S", time.localtime())
|
||||
collection_name = str(datetime.date.today())
|
||||
MONGO_STORE_MANAGER.insert_reserve_result(collection_name=collection_name, reserve=result)
|
||||
@@ -57,6 +57,11 @@ class Sender:
|
||||
else:
|
||||
self._csrf = csrf
|
||||
_csrf = csrf
|
||||
# 默认为空,也就是随机
|
||||
_selected_store = ''
|
||||
if contact.store is not None and contact.store != "random":
|
||||
_selected_store = contact.store
|
||||
self.logger.info("store is:{}".format(_selected_store))
|
||||
headers = {'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'User-Agent': js_data.ua,
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
|
||||
@@ -64,7 +69,7 @@ class Sender:
|
||||
'Sec-Fetch-Mode': 'navigate',
|
||||
'Sec-Fetch-Dest': 'document',
|
||||
'Accept-Language': 'fr-FR,fr;q=0.6'}
|
||||
data = {'check': '', '_csrf': _csrf, 'prefer': '',
|
||||
data = {'check': '', '_csrf': _csrf, 'prefer': _selected_store,
|
||||
'surname': contact.last_name.capitalize(), 'name': contact.first_name.capitalize(),
|
||||
'phone_country': "FR", 'phone_number': "+33 " + contact.phone, 'email': contact.mail,
|
||||
'passport_id': contact.passport, 'processing': 'on', 'cgu': 'on'}
|
||||
@@ -81,7 +86,8 @@ class Sender:
|
||||
# add to mongodb
|
||||
self.logger.info(response.text)
|
||||
self.logger.info("{}:{}".format(contact.mail, response.url))
|
||||
self.publish_message_to_queue(contact, status=PublishType.SUCCESS, url=response.url)
|
||||
self.publish_message_to_queue(contact, status=PublishType.SUCCESS, url=response.url,
|
||||
store_type=_selected_store)
|
||||
cookies_to_set = response.headers['set-cookie']
|
||||
self.cookie.load(cookies_to_set)
|
||||
new_cookies = {k: v.value for k, v in self.cookie.items()}
|
||||
|
||||
Reference in New Issue
Block a user