2

I have completed a tiny selenium spider project with Browsermob-Proxy, but the Browsermob-Proxy written by java, I need to package whole project file into a single executable file, but use Browsermob-Proxy is unavailable job!

So I plan use mitmproxy that written by python, but I can’t find any documentation mention that how can return response or request data directly in python script code without saving data in alternative text file.

If can use the method of Browsermob-Proxy,it’s the best solution, like this

BMPproxy.new_har("video",options={'captureContent': True,'captureContent': True})

    # selenium code
    brosver.get(url)
    brosver.find_element_by_xpath('//*[@id="kw"]').send_keys("python")
    brosver.find_element_by_xpath('//*[@id="su"]').click()

    json_data = BMPproxy.har
cigien
  • 57,834
  • 11
  • 73
  • 112

0 Answers0