from seleniumwire import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
driver = webdriver.Chrome('chromedriver', options=chrome_options,seleniumwire_options=options)yine aynı şekilde yapılıyor yazıyor ancak denemedim
from seleniumwire import webdriver as uc
self.options = uc.ChromeOptions()
self.chrome_options = uc.ChromeOptions()
self.options = {
'proxy': {
'http': f'http://{self.hostUser}:{self.hostPass}@{self.host}',
'https': f'http://{self.hostUser}:{self.hostPass}@{self.host}',
'no_proxy': 'localhost,127.0.0.1'
}
}
self.chrome_options.add_argument('--headless')
self.chrome_options.add_argument('--no-sandbox')
self.browser = uc.Chrome(options=self.chrome_options, seleniumwire_options=self.options)
self.browser.get(self.url)Alınan hata:
[0623/115909.471:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[0623/115909.495:ERROR:command_buffer_proxy_impl.cc(123)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED
(Session info: headless chrome=91.0.4472.114)