options = webdriver.ChromeOptions()
options.add_experimental_option(‘useAutomationExtension’, False)
options.add_experimental_option(‘excludeSwitches’, [‘enable-automation’])
driver = webdriver.Chrome(chrome_options=options)
driver.execute_cdp_cmd(“Page.addScriptToEvaluateOnNewDocument”, {
“source”: “”"
Object.defineProperty(navigator, ‘webdriver’, {
get: () => undefined
})
“”"
})
[爬虫]webdriver被识别
最新推荐文章于 2024-04-12 13:38:11 发布