41. SSL Certificates, Custom Profiles & Corporate Proxies

Handling Insecure Certificates & Proxies in Python

from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.proxy import Proxy, ProxyType

options = Options()
options.accept_insecure_certs = True

# Proxy setup:
proxy = Proxy()
proxy.proxy_type = ProxyType.MANUAL
proxy.http_proxy = "corp-proxy:8080"
options.proxy = proxy

driver = webdriver.Chrome(options=options)

Task

  • Implement enable_insecure_certs(options):
  • 1. options.accept_insecure_certs = True
  • 2. return options
πŸ’‘Common doubts
Did you like the problem?
Lesson 41 of 43
Python
Loading code editor…
Next