首页 > 其他分享 >3-selenium反爬了,网页打开一直提示失败

3-selenium反爬了,网页打开一直提示失败

时间:2023-05-04 18:46:27浏览次数:47  
标签:webdriver 网页 option 提示 selenium driver ChromeOptions add

添加如下代码

from selenium.webdriver import ChromeOptions
option = ChromeOptions()
option.add_experimental_option('excludeSwitches', ['enable-automation'])
option.add_argument("disable-blink-features=AutomationControlled")

driver = webdriver.Chrome("chromedriver",0,options=option)
driver.get("https://www.xiaohongshu.com")

标签:webdriver,网页,option,提示,selenium,driver,ChromeOptions,add
From: https://www.cnblogs.com/SparkProgram/p/17372192.html

相关文章