Skip to content

use_wire=True, undetected=True doesn't working simultaneously #2243

Closed
@juhacz

Description

@juhacz

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeduplicateThe answer/solution already exists somewhere

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions