当前位置:网站首页>[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")
边栏推荐
- Solve server returns invalid timezone Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
- Routing strategy of multi-point republication [Huawei]
- SQL lab 21~25 summary (subsequent continuous update) (including secondary injection explanation)
- 【二叉树】删点成林
- ICLR 2022 | 基于对抗自注意力机制的预训练语言模型
- 如何将 @Transactional 事务注解运用到炉火纯青?
- Is it safe to open an account in Ping An Securities mobile bank?
- The left-hand side of an assignment expression may not be an optional property access. ts(2779)
- 编译 libssl 报错
- 金融数据获取(三)当爬虫遇上要鼠标滚轮滚动才会刷新数据的网页(保姆级教程)
猜你喜欢
如何将 @Transactional 事务注解运用到炉火纯青?
Multi row and multi column flex layout
IPv6 experiment
【深度学习】图像多标签分类任务,百度PaddleClas
Day-15 common APIs and exception mechanisms
Connect to blog method, overload, recursion
Routing strategy of multi-point republication [Huawei]
(to be deleted later) yyds, paid academic resources, please keep a low profile!
On valuation model (II): PE index II - PE band
Day-14 common APIs
随机推荐
【PyTorch实战】图像描述——让神经网络看图讲故事
什么是ESP/MSR 分区,如何建立ESP/MSR 分区
Tutorial on principles and applications of database system (009) -- conceptual model and data model
[learn micro services from 0] [02] move from single application to service
Experiment with a web server that configures its own content
leetcode刷题:二叉树22(二叉搜索树的最小绝对差)
SQL Lab (36~40) includes stack injection, MySQL_ real_ escape_ The difference between string and addslashes (continuous update after)
数据库安全的重要性
Connect to blog method, overload, recursion
Pule frog small 5D movie equipment | 5D movie dynamic movie experience hall | VR scenic area cinema equipment
Day-16 set
密码学系列之:在线证书状态协议OCSP详解
【PyTorch实战】用PyTorch实现基于神经网络的图像风格迁移
Master formula. (used to calculate the time complexity of recursion.)
Minimalist movie website
The road to success in R & D efficiency of 1000 person Internet companies
【统计学习方法】学习笔记——支持向量机(上)
[statistical learning method] learning notes - support vector machine (I)
leetcode刷题:二叉树19(合并二叉树)
[pytorch practice] image description -- let neural network read pictures and tell stories