sudo pip install mitmproxy
import time
from proxyserver import MITMProxyRunThread
MITMProxyRunThread(8080, 'mitmproxy', plugin=['plugin_req_requestrecorder']).start()
time.sleep(10)
Run mitmproxy with plugins as background and capture network information in your automation testing
Python
sudo pip install mitmproxy
import time
from proxyserver import MITMProxyRunThread
MITMProxyRunThread(8080, 'mitmproxy', plugin=['plugin_req_requestrecorder']).start()
time.sleep(10)