多数网站通用的检测selenium的方法。
!function(n) {
function i() {
return "$cdc_asdjflasutopfhvcZLmcfl_"in u || f.webdriver
}
解决办法:
self.options = webdriver.ChromeOptions()
# self.options.add_argument('--headless')
self.options.add_experimental_option('excludeSwitches', ['enable-automation'])
self.driver = webdriver.Chrome(options=self.options)
将浏览器设置为开发者模式。