Python client for the BrowserMob Proxy 2.0 REST API.
from browsermobproxy import Server s = Server("path/to/browsermob-proxy") s.start() proxy = s.create_proxy from selenium import webdriver profile = webdriver.FirefoxProfile() profile.set_proxy(proxy.selenium_proxy()) driver = webdriver.Firefox(firefox_profile=p) proxy.new_har("google") driver.get("http://www.google.co.uk") proxy.har # returns a HAR JSON blob proxy.stop() driver.quit()
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Send me a pull request. Bonus points for topic branches.
Copyright 2011 David Burns
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.