We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i am facing "ERR_TUNNEL_CONNECTION_FAILED" error again and again. Please tell me how can i fix this .. my code is given below
`from selenium import webdriver from browsermobproxy import Server from webdriver_manager.chrome import ChromeDriverManager
server = Server(r"\browsermob-proxy-2.1.4\bin\browsermob-proxy") server.start() proxy = server.create_proxy()
chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--proxy-server={0}".format(proxy.proxy)) chrome_options.add_argument("--proxy-bypass-list=*dev.abccorp.com"); driver = webdriver.Chrome(chrome_options=opts, executable_path = ChromeDriverManager().install())
proxy.new_har("my_website")
driver.get("https://www.google.com")
har = proxy.har with open("my_website.har", "w") as har_file: har_file.write(str(har))
driver.quit() server.stop() `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i am facing "ERR_TUNNEL_CONNECTION_FAILED" error again and again. Please tell me how can i fix this .. my code is given below
`from selenium import webdriver
from browsermobproxy import Server
from webdriver_manager.chrome import ChromeDriverManager
Set up BrowserMob Proxy
server = Server(r"\browsermob-proxy-2.1.4\bin\browsermob-proxy")
server.start()
proxy = server.create_proxy()
Set up Chrome driver with proxy settings
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--proxy-server={0}".format(proxy.proxy))
chrome_options.add_argument("--proxy-bypass-list=*dev.abccorp.com");
driver = webdriver.Chrome(chrome_options=opts, executable_path = ChromeDriverManager().install())
Start capturing network traffic
proxy.new_har("my_website")
Navigate to a website
driver.get("https://www.google.com")
Stop capturing traffic and save HAR file
har = proxy.har
with open("my_website.har", "w") as har_file:
har_file.write(str(har))
Quit the browser and proxy server
driver.quit()
server.stop()
`
The text was updated successfully, but these errors were encountered: