File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
changedetectionio/content_fetchers Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -104,15 +104,17 @@ def _run_sync():
104104
105105 from selenium .webdriver .remote .remote_connection import RemoteConnection
106106 from selenium .webdriver .remote .webdriver import WebDriver as RemoteWebDriver
107+ from selenium .webdriver .remote .client_config import ClientConfig
108+ from urllib3 .util import Timeout
107109 driver = None
108110 try :
109- # Create the RemoteConnection and set timeout (e.g., 30 seconds)
110- remote_connection = RemoteConnection (
111- self .browser_connection_url ,
111+ connection_timeout = int (os .getenv ("WEBDRIVER_CONNECTION_TIMEOUT" , 90 ))
112+ client_config = ClientConfig (
113+ remote_server_addr = self .browser_connection_url ,
114+ timeout = Timeout (connect = connection_timeout , total = connection_timeout )
112115 )
113- remote_connection . set_timeout ( 30 ) # seconds
116+ remote_connection = RemoteConnection ( client_config = client_config )
114117
115- # Now create the driver with the RemoteConnection
116118 driver = RemoteWebDriver (
117119 command_executor = remote_connection ,
118120 options = options
You can’t perform that action at this time.
0 commit comments