selenium

# 反检测
option = webdriver.ChromeOptions()
option.add_experimental_option('excludeSwitches', ['enable-automation'])
option.add_argument('--disable-blink-features=AutomationControlled')
driver = webdriver.Chrome(executable_path='d:\python\chromedriver.exe', options=option)

# 启用带插件的chrome
option.add_argument("--user-data-dir=" + r"C:/Users/Joy/AppData/Local/Google/Chrome/User Data/")

  

posted @ 2021-10-30 18:18  黑桃皇后  阅读(41)  评论(0)    收藏  举报