当前位置:网站首页>[crawler] avoid script detection when using selenium
[crawler] avoid script detection when using selenium
2022-07-07 12:46:00 【Big watermelon and small chestnut】
Problem phenomenon
There is a slider in a script attempt to login , No matter how you drag it , It will report errors . Even if the script fills in the data , Dragging the slider by yourself will always report errors .
Problem solving
This problem is mainly due to the application's detection of scripts . The basis of the test is
window.navigator.webdriver
The following figure is modified , Return before setting true.
When requesting a page , The first options Set it up . The following code is only for chrome 88 Useful above version .

Script
from selenium.webdriver.chrome.options import Options
option = Options()
option.add_argument('--disable-blink-features=AutomationControlled')
web = Chrome(options=option)
web.get("https://www.baidu.com")
边栏推荐
- Airserver automatically receives multi screen projection or cross device projection
- 爱可可AI前沿推介(7.7)
- What if does not match your user account appears when submitting the code?
- NGUI-UILabel
- 聊聊Redis缓存4种集群方案、及优缺点对比
- 对话PPIO联合创始人王闻宇:整合边缘算力资源,开拓更多音视频服务场景
- Vxlan static centralized gateway
- Importance of database security
- 密码学系列之:在线证书状态协议OCSP详解
- ps链接图层的使用方法和快捷键,ps图层链接怎么做的
猜你喜欢

leetcode刷题:二叉树22(二叉搜索树的最小绝对差)

visual stdio 2017关于opencv4.1的环境配置

Idea 2021 Chinese garbled code

Epp+dis learning road (2) -- blink! twinkle!

对话PPIO联合创始人王闻宇:整合边缘算力资源,开拓更多音视频服务场景

leetcode刷题:二叉树24(二叉树的最近公共祖先)

The left-hand side of an assignment expression may not be an optional property access.ts(2779)

Solutions to cross domain problems

Customize the web service configuration file

Static vxlan configuration
随机推荐
Will the filing free server affect the ranking and weight of the website?
【PyTorch实战】用PyTorch实现基于神经网络的图像风格迁移
如何将 @Transactional 事务注解运用到炉火纯青?
Minimalist movie website
[pytorch practice] use pytorch to realize image style migration based on neural network
通讯协议设计与实现
Customize the web service configuration file
leetcode刷题:二叉树27(删除二叉搜索树中的节点)
How to use PS link layer and shortcut keys, and how to do PS layer link
Zhimei creative website exercise
Epp+dis learning road (2) -- blink! twinkle!
Vxlan 静态集中网关
Preorder, inorder and postorder traversal of binary tree
利用棧來實現二進制轉化為十進制
浅谈估值模型 (二): PE指标II——PE Band
The left-hand side of an assignment expression may not be an optional property access.ts(2779)
The left-hand side of an assignment expression may not be an optional property access. ts(2779)
【从 0 开始学微服务】【01】什么是微服务
Day-15 common APIs and exception mechanisms
【从 0 开始学微服务】【00】课程概述