‘excludeSwitches‘ 的 [‘enable-logging‘] 和[‘enable-automation‘]

selenium 使用 chrome 浏览器的 chromedriver 时,可以加参数,

chrome_options=webdriver.ChromeOptions()
chrome_options.add_experimental_option('excludeSwitches',['enable-logging'])
chrome_options.add_experimental_option('excludeSwitches',['enable-automation'])

driver=webdriver.Chrome(options=chrome_options)

经过测试,
'excludeSwitches',['enable-logging'] 是关闭,控制台(terminal)中
关于

DevTools listening on ws://127.0.0.1

DevTools listening on ws://127.0.0.1:6409/devtools/browser/0a8e658d-8d72-47d4-b7b0-f71a79ab14c9
PS C:\Users\admin\Desktop\bilibili> [8852:15236:0215/145558.279:ERROR:device_event_log_impl.cc(218)] [14:55:58.289] USB: usb_device_handle_win.cc:1046 Failed to read descriptor from node connection: ����ϵͳ�ϵ��豸û�з������á� (0x1F)

乱码
����ϵͳ�ϵ��豸û�з������á�
转换出错
的意思

'excludeSwitches',['enable-logging'] 就是用来关闭,控制台(terminal)中
关于 DevTools listening on ws://127.0.0.1 这些错误提示的。

而,'excludeSwitches',['enable-logging'] ,
是用来 隐藏 自动化页面中地址栏下方的 “正由自动化软件控制” 的那个提示行,
网上对这个参数 解释 是:规避监测

感兴趣,可以去查询相关资料。

February the 15th 2023 Wednesday

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值