新版chrome的webdriver检测应对
最近发现用 execute_cdp_cmd 覆盖 webdriver 失效了,下面通过配置隐藏navigator.webdriver:
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option('useAutomationExtension',False)
chrome_options.add_argument("disable-blink-features")
chrome_options.add_argument("disable-blink-features=AutomationControlled")
driver=webdriver.Chrome(executable_path=r'',chrome_options =chrome_options)
driver.get("https://bot.sannysoft.com/")
访问sannysoft.com可以发现成功绕过检测。
博客一直在更新,https://blog.csdn.net/weixin_43582101