define PROXY_TIMEOUT_S
This commit is contained in:
+2
-1
@@ -13,6 +13,7 @@ from models.result_pojo import RequestResult
|
||||
from queue_message.CookiesPublisher import CookiesPublisher
|
||||
from utils.address_ip import get_address_ip
|
||||
from workers.captcha_result_getter import CaptchaResultGetter
|
||||
from workers.proxy_constants import PROXY_TIMEOUT_S
|
||||
|
||||
|
||||
def get_chrome_version_from_ua(ua):
|
||||
@@ -206,7 +207,7 @@ class Sender:
|
||||
proxy_to_use = self.proxy_to_use
|
||||
# print(proxy_to_use)
|
||||
response = requests.post(url=url, proxies=proxy_to_use, verify=False, headers=headers, data=data,
|
||||
timeout=15, allow_redirects=False, impersonate="chrome99_android")
|
||||
timeout=PROXY_TIMEOUT_S, allow_redirects=False, impersonate="chrome99_android")
|
||||
self.logger.info(response.status_code)
|
||||
if response.status_code == 302:
|
||||
# add to mongodb
|
||||
|
||||
Reference in New Issue
Block a user