change page_load_timeout to 30s
This commit is contained in:
@@ -26,6 +26,7 @@ DOUBLE_REQUEST_ERROR_MESSAGE = "A request with the same data has already been va
|
||||
TOO_MANY_REQUEST_ERROR_MESSAGE = "Due to a large number of requests"
|
||||
TIME_OUT = 400000
|
||||
OTP_TIMEOUT = 240
|
||||
PAGE_TIMEOUT = 20000
|
||||
|
||||
|
||||
def get_random_wait_time() -> float:
|
||||
@@ -122,7 +123,7 @@ class CommandorPage:
|
||||
|
||||
def start_browser(self, proxy, pwright, device) -> Union[str, None]:
|
||||
try:
|
||||
self.browser = pwright.webkit.launch(headless=False, timeout=90000, proxy=proxy)
|
||||
self.browser = pwright.webkit.launch(headless=False, timeout=PAGE_TIMEOUT, proxy=proxy)
|
||||
self.logger.info("模拟设备: " + device)
|
||||
pixel_2 = pwright.devices[device]
|
||||
context = self.browser.new_context(**pixel_2, locale='en-GB')
|
||||
@@ -137,7 +138,7 @@ class CommandorPage:
|
||||
}
|
||||
""")
|
||||
self.page.on("load", self._on_page_loaded)
|
||||
self.page.goto(RDV_URL, timeout=90000)
|
||||
self.page.goto(RDV_URL, timeout=PAGE_TIMEOUT)
|
||||
return self.page.content()
|
||||
except Exception as error:
|
||||
params.oracle_log_sender.send_error(str(error))
|
||||
|
||||
Reference in New Issue
Block a user