Does anyone know how I could pass to the Chrome function of the python undetected_chromedriver (v3.5.5) module a parameter in the header with a token to use in a get request.Thanks in advance
I tried this but it failed me:
def init_webdriver(headless=False, token=None): options = uc.ChromeOptions() user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/122.0.0.0" options.add_argument(f"user-agent={user_agent}") options.add_argument(f"authorization={token}") driver = uc.Chrome(headless=headless,options=options) return driver