I am analyzing a site and I want to obtain the token that is sent in one of the requests that are made. I was looking for information on various sites but I couldn't find a way to get the headers that are "sent" from each request; not the ones I receive.
Example of my code:
from selenium import webdriver
url = 'www.google.com'
driver = webdriver.Firefox()
driver.get(url)
headers = driver.requests # Quiero obtener una lista de los headers que se envían en c/petición
print("Requests", driver.requests) # Pero obtengo los headers que el servidor responde
There is no problem if you need to use another library.
Thank you!
Thanks to ChemaCortes comment the problem can be solved using Playwright: https://pypi.org/project/playwright/
I pass an example published in the previous link:
I attach documentation from the Networks section that would be useful: https://playwright.dev/python/docs/network