Closed
Description
I want to use slenium wire and undetected simultaneously in selenium base.
Below is an example program that should inject the "application/vnd.opbox-web.v2+json" header during GET, but it doesn't work. When I remove "undetected=True the program works fine, the header is injected. Am I doing something wrong? If so, please provide an example of a working program. Thank you
import seleniumbase
def interceptor(request):
del request.headers['Accept']
request.headers['Accept'] = 'application/vnd.opbox-web.v2+json'
driver = seleniumbase.Driver(use_wire=True, undetected=True)
driver.request_interceptor = interceptor
driver.get("https://httpbin.org/headers")
print(driver.get_page_source())
print(driver.requests)
driver.quit()