当前位置:网站首页>[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")
边栏推荐
- Utiliser la pile pour convertir le binaire en décimal
- Using stack to convert binary to decimal
- [pytorch practice] use pytorch to realize image style migration based on neural network
- 2022危险化学品生产单位安全生产管理人员考题及在线模拟考试
- Visual stdio 2017 about the environment configuration of opencv4.1
- 【二叉树】删点成林
- 数据库安全的重要性
- OSPF exercise Report
- Charles: four ways to modify the input parameters or return results of the interface
- Is it safe to open an account in Ping An Securities mobile bank?
猜你喜欢
OSPF exercise Report
Solutions to cross domain problems
SQL Lab (41~45) (continuous update later)
Solve server returns invalid timezone Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
【PyTorch实战】用RNN写诗
SQL Lab (32~35) contains the principle understanding and precautions of wide byte injection (continuously updated later)
对话PPIO联合创始人王闻宇:整合边缘算力资源,开拓更多音视频服务场景
Session
随机推荐
[statistical learning method] learning notes - logistic regression and maximum entropy model
What is an esp/msr partition and how to create an esp/msr partition
2022-07-07日报:GAN发明者Ian Goodfellow正式加入DeepMind
SQL Lab (46~53) (continuous update later) order by injection
普乐蛙小型5d电影设备|5d电影动感电影体验馆|VR景区影院设备
[play RT thread] RT thread Studio - key control motor forward and reverse rotation, buzzer
【PyTorch实战】用RNN写诗
[statistical learning method] learning notes - support vector machine (I)
[learn micro services from 0] [02] move from single application to service
图像像素读写操作
SQL lab 1~10 summary (subsequent continuous update)
Day-18 hash table, generic
Object. Simple implementation of assign()
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
【PyTorch实战】用PyTorch实现基于神经网络的图像风格迁移
Minimalist movie website
leetcode刷题:二叉树19(合并二叉树)
数据库安全的重要性
密码学系列之:在线证书状态协议OCSP详解
【统计学习方法】学习笔记——第四章:朴素贝叶斯法