test lang=en in cookies

This commit is contained in:
2024-09-20 20:53:40 +02:00
parent b975f99108
commit d558f8c403
7 changed files with 54 additions and 40 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ from workers.proxies_constants import PROXY_LIST_FR
API_KEY = "d66aaf490d8aa424a5175e1fbd1aadea"
HOST_ADDRESS = "https://api.2captcha.com/createTask"
HERMES_REGISTER = "https://rendezvousparis.hermes.com/client/register"
HERMES_REGISTER = "https://rendezvousparis.hermes.com/client/register?lang=en"
# HERMES_REGISTER = "https://rendezvousparis.hermes.com/client/register"
class CaptchaResultGetter:
+4 -1
View File
@@ -62,11 +62,14 @@ class LinkValidatorWithProvidedList(threading.Thread):
'Accept': '*/*',
'Accept-Encoding': 'gzip, deflate, br',
'Cache-Control': 'max-age=0',
'Referer': linkPojo.url,
# 'Referer': linkPojo.url,
'Cookie': self.cookie_str,
'Sec-Fetch-Mode': 'navigate',
'Host': 'rendezvousparis.hermes.com',
'Sec-Fetch-Site': 'same-origin',
'sec-ch-ua': '"Brave";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
'sec-ch-ua-platform': '"Android"',
'sec-ch-ua-model': '""',
'Sec-Fetch-Dest': 'document',
'Accept-Language': 'fr-FR,fr;q=0.6'}
print("received cookie is " + str(self.cookie_str))
+6
View File
@@ -73,6 +73,12 @@ class Sender:
if contact.store is not None and contact.store != "random":
_selected_store = contact.store
self.logger.info("store is:{}".format(_selected_store))
if "lang=" not in self.cookie_str:
self.cookie_str = self.cookie_str + "; lang=en"
else:
self.cookie_str.replace("lang=fr", "lang=en")
self.logger.info("cookie_str is:{}".format(self.cookie_str))
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',