python - Installing Browsermob proxy for getting HTTP codes -


i might seem naive while asking this. need retrieve various http codes, few of our test scenarios. know selenium cannot alone , have use third party resource- may proxy browsermob.

has 1 worked on this. have gone through various tutorials -like 1 here can't seem able work around using this.

i installed browsermob using pip method , giving path as

  browsermobproxy import server   server = server('/usr/local/lib/python3.4/dist-packages/browsermobproxy') 

however, receiving exception

  exception: browsermob-proxy binary couldn't found in path provided: /usr/local/lib/python3.4/dist-packages/browsermobproxy  

my question - there anything- file might missing here? need download other files or path incorrect?

i bit confused when starting too, i'm assuming installed browsermobproxy package using pip. need download browsermob-proxy binary (available here: https://bmp.lightbody.net/), point it within python script.

i using virtual environment put here:

/users/username/envs/scrapeproj/bin/browsermob-proxy-2.1.2/bin/browsermob-proxy 

if error message:

error: java_home not defined correctly. 

run these commands in terminal:

export java_home=$(/usr/libexec/java_home) export path=$java_home/jre/bin:$path 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -