当前位置:网站首页>[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")
边栏推荐
- Day-15 common APIs and exception mechanisms
- Common knowledge of one-dimensional array and two-dimensional array
- 【深度学习】图像多标签分类任务,百度PaddleClas
- Customize the web service configuration file
- 广州市召开安全生产工作会议
- 【统计学习方法】学习笔记——支持向量机(上)
- leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
- leetcode刷题:二叉树26(二叉搜索树中的插入操作)
- leetcode刷题:二叉树24(二叉树的最近公共祖先)
- Solve server returns invalid timezone Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
猜你喜欢
The IDM server response shows that you do not have permission to download the solution tutorial
Tutorial on the principle and application of database system (011) -- relational database
How to apply @transactional transaction annotation to perfection?
SQL Lab (36~40) includes stack injection, MySQL_ real_ escape_ The difference between string and addslashes (continuous update after)
如何将 @Transactional 事务注解运用到炉火纯青?
Day-18 hash table, generic
Attack and defense world - PWN learning notes
聊聊Redis缓存4种集群方案、及优缺点对比
Aike AI frontier promotion (7.7)
Learning and using vscode
随机推荐
Decrypt gd32 MCU product family, how to choose the development board?
ip2long之后有什么好处?
数据库安全的重要性
Static routing assignment of network reachable and telent connections
[statistical learning methods] learning notes - Chapter 5: Decision Tree
【深度学习】图像多标签分类任务,百度PaddleClas
SQL lab 11~20 summary (subsequent continuous update) contains the solution that Firefox can't catch local packages after 18 levels
On valuation model (II): PE index II - PE band
Epp+dis learning path (1) -- Hello world!
【二叉树】删点成林
File upload vulnerability - upload labs (1~2)
Configure an encrypted web server
金融数据获取(三)当爬虫遇上要鼠标滚轮滚动才会刷新数据的网页(保姆级教程)
Solutions to cross domain problems
Day-18 hash table, generic
leetcode刷题:二叉树24(二叉树的最近公共祖先)
SQL head injection -- injection principle and essence
Dialogue with Wang Wenyu, co-founder of ppio: integrate edge computing resources and explore more audio and video service scenarios
Vxlan 静态集中网关
HZOJ #235. 递归实现指数型枚举