NODRIVER: how i can use nodriver to login and capture every https and cookies when login??
marioeivissa opened this issue · comments
any help?, cant find the way to login with nodriver and get cookies and every https in the response, like when login and we use f12 and we see all response all https and all cookies??' thanks
You should register some handlers for network events. There is a 'network_monitor.py' example, also you can check out #1832, there's a sample of working code there.
You should register some handlers for network events. There is a 'network_monitor.py' example, also you can check out #1832, there's a sample of working code there.
no mate im using mitmproxy with a script like this mitmproxy_1.py import json
from mitmproxy import http
def response(flow: http.HTTPFlow) -> None:
if flow.request.pretty_url == "https://.apps..pt/Services/Authentication/User.svc/GetToken":
try:
response_data = json.loads(flow.response.text)
result_value = response_data.get('Result')
if result_value:
print("Valor de 'Result' encontrado en la respuesta:", result_value)
# Guardar el token en un archivo JSON
with open('tokensportmeo.json', 'w') as file:
json.dump({'token': result_value}, file)
print("Token guardado en tokensportmeo.json")
else:
print("No se encontró el valor de 'Result' en la respuesta.")
except json.JSONDecodeError as e:
print(f"Error al decodificar JSON en la respuesta: {e}")
and not working in linux, working perfect in windows not in linux