{"id":27623,"library":"browsermob-proxy","title":"Browsermob Proxy Python Client","description":"A Python client library for interacting with the Browsermob Proxy, used for capturing HTTP/HTTPS traffic in HAR format. Current version 0.8.0, last released in 2015, now in maintenance mode.","status":"maintenance","version":"0.8.0","language":"python","source_language":"en","source_url":"https://github.com/automatedtester/browsermob-proxy-py","tags":["proxy","selenium","browsermob","har","testing"],"install":[{"cmd":"pip install browsermob-proxy","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"HTTP client for API calls to Browsermob Proxy REST API","package":"requests","optional":false},{"reason":"Often used together for browser automation with proxy integration","package":"selenium","optional":true}],"imports":[{"note":"Incorrect: 'browsermobproxy.Server' is not a module; use from ... import syntax","wrong":"import browsermobproxy.Server","symbol":"Server","correct":"from browsermobproxy import Server"},{"note":"","wrong":"","symbol":"Client","correct":"from browsermobproxy import Client"}],"quickstart":{"code":"from browsermobproxy import Server\nfrom selenium import webdriver\n\n# Start Browsermob Proxy server\nserver = Server('/path/to/browsermob-proxy')\nserver.start()\nproxy = server.create_proxy()\n\n# Configure Selenium to use proxy\nfrom selenium.webdriver.common.proxy import Proxy, ProxyType\nselenium_proxy = Proxy()\nselenium_proxy.proxy_type = ProxyType.MANUAL\nselenium_proxy.http_proxy = proxy.proxy\nselenium_proxy.ssl_proxy = proxy.proxy\n\ncapabilities = webdriver.DesiredCapabilities.CHROME\nproxy.add_to_capabilities(capabilities)\n\ndriver = webdriver.Chrome(desired_capabilities=capabilities)\n\n# Enable HAR capture\nproxy.new_har('test')\ndriver.get('http://example.com')\n\n# Get HAR data\nhar = proxy.har\nprint(har)\n\n# Cleanup\ndriver.quit()\nserver.stop()","lang":"python","description":"Start Browsermob Proxy, integrate with Selenium, capture HAR data."},"warnings":[{"fix":"Use browserup-proxy Python package instead: pip install browserup-proxy and update import to 'from browserup_proxy import Server'","message":"Library is unmaintained since 2015. Browsermob Proxy itself has been discontinued. Consider migrating to BrowserUp Proxy (browserup-proxy) which is the actively maintained fork.","severity":"deprecated","affected_versions":">=0.8.0"},{"fix":"Ensure the Browsermob Proxy binary is installed or use the 'local=True' parameter in Server() to auto-download (may fail on some systems).","message":"The library requires a running Browsermob Proxy Java binary. It does not start the proxy automatically; you must provide the path to the browsermob-proxy executable or use the local=True flag for it to download and start a local instance (only works if the binary is not present).","severity":"gotcha","affected_versions":"all"},{"fix":"Call proxy.close() after finishing, not client.session.close().","message":"The 'create_proxy' method may return a Client object that uses requests.Session; if you close the session prematurely, subsequent calls fail. Always use proxy.close() to clean up.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Provide correct path to 'browsermob-proxy' binary: Server('/usr/local/bin/browsermob-proxy') or set PATH.","cause":"The library cannot find the Browsermob Proxy binary. Either the path is incorrect or the binary is not installed.","error":"browsermobproxy.exceptions.ProxyNotFoundError: The browsermob proxy executable was not found. Please specify the path to the executable."},{"fix":"Use 'from browsermobproxy import Server'","cause":"Incorrect import statement; often from copy-paste of wrong syntax.","error":"AttributeError: module 'browsermobproxy' has no attribute 'Server'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}