0

how do i get the request headers using selenium? I don't want to use SeleniumWire because i use the undetected chrome driver.

I tried this but it doesn't give me the headers i want:

headers = browser.execute_script("var req = new XMLHttpRequest();req.open('GET', document.location, false);req.send(null);return req.getAllResponseHeaders()")
headers = headers.splitlines()
randomguy
  • 63
  • 1
  • 6
  • EDIT: This is what i want: https://ibb.co/Lt9YhGf – randomguy Apr 16 '21 at 17:31
  • Have you explored the first ans of this thread - https://stackoverflow.com/questions/62262261/how-to-get-request-headers-in-selenium – Swaroop Humane Apr 16 '21 at 18:02
  • @SwaroopHumane i already looked at this thread but I don't want to use SeleniumWare (because i use undetected chrome driver) or neither BrowserMob Proxy – randomguy Apr 16 '21 at 18:08

0 Answers0