Skip to content
This repository

A python wrapper for Browsermob Proxy

tag: v0.0.1

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 browsermobproxy
Octocat-spinner-32 .gitignore added build directories to ignore January 15, 2012
Octocat-spinner-32 readme.md
Octocat-spinner-32 setup.py
readme.md

browsermob-proxy-py

Python client for the BrowserMob Proxy 2.0 REST API.

How to use with selenium-webdriver

Manually:

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()

See also

Note on Patches/Pull Requests

  • 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

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

http://www.apache.org/licenses/LICENSE-2.0

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.

Something went wrong with that request. Please try again.