I'm trying to install browsermob-proxy, but after installing it and trying to use I'm getting an error: "Browsermob-Proxy binary couldn't be found in path provided: path/to/browsermob-proxy"
I installed Browsermob-Proxy using pip:
pip install browsermob-proxy
And then used the code I found in the internet:
from browsermobproxy import Server
server = Server("/anaconda3/lib/python3.7/site-packages/browsermobproxy/")
server.start()
proxy = server.create_proxy()
from selenium import webdriver
profile = webdriver.FirefoxProfile()
profile.set_proxy(proxy.selenium_proxy())
driver = webdriver.Firefox(firefox_profile=profile)
proxy.new_har("google")
driver.get("http://www.google.co.uk")
proxy.har # returns a HAR JSON blob
server.stop()
driver.quit()
Executing this code, I'm getting and error "Browsermob-Proxy binary couldn't be found in path provided: /anaconda3/lib/python3.7/site-packages/browsermobproxy/".
Googled but didn't find a solution.
I checked answers to this question Getting error "Browsermob-Proxy binary couldn't be found in path provided: path/to/browsermob-proxy" after installation of Browsermob-Proxy, but the code provided there results in the same error.
Can someone help me please?
Thank you