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/")

  

上一篇:rm: invalid option -- ‘n‘和mv: invalid option -- ‘s‘


下一篇:pycharm打印结果被折叠