当前位置:网站首页>[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")
边栏推荐
- Attack and defense world - PWN learning notes
- Preorder, inorder and postorder traversal of binary tree
- leetcode刷题:二叉树24(二叉树的最近公共祖先)
- Zhimei creative website exercise
- On valuation model (II): PE index II - PE band
- [pytorch practice] write poetry with RNN
- 解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
- About web content security policy directive some test cases specified through meta elements
- How much does it cost to develop a small program mall?
- How to use PS link layer and shortcut keys, and how to do PS layer link
猜你喜欢

AirServer自动接收多画面投屏或者跨设备投屏

聊聊Redis缓存4种集群方案、及优缺点对比

Sorting, dichotomy

数据库安全的重要性
![[play RT thread] RT thread Studio - key control motor forward and reverse rotation, buzzer](/img/5f/75549fc328d7ac51f8b97eef2c059d.png)
[play RT thread] RT thread Studio - key control motor forward and reverse rotation, buzzer

金融数据获取(三)当爬虫遇上要鼠标滚轮滚动才会刷新数据的网页(保姆级教程)

leetcode刷题:二叉树20(二叉搜索树中的搜索)
![[statistical learning method] learning notes - support vector machine (Part 2)](/img/bc/bb4f809ff434fabc10f8e97f592fa7.png)
[statistical learning method] learning notes - support vector machine (Part 2)

Tutorial on the principle and application of database system (011) -- relational database

leetcode刷题:二叉树19(合并二叉树)
随机推荐
通讯协议设计与实现
【统计学习方法】学习笔记——第五章:决策树
聊聊Redis缓存4种集群方案、及优缺点对比
leetcode刷题:二叉树23(二叉搜索树中的众数)
2022A特种设备相关管理(锅炉压力容器压力管道)模拟考试题库模拟考试平台操作
SQL lab 21~25 summary (subsequent continuous update) (including secondary injection explanation)
ICLR 2022 | 基于对抗自注意力机制的预训练语言模型
【PyTorch实战】图像描述——让神经网络看图讲故事
【从 0 开始学微服务】【03】初探微服务架构
Error in compiling libssl
File upload vulnerability - upload labs (1~2)
What is an esp/msr partition and how to create an esp/msr partition
密码学系列之:在线证书状态协议OCSP详解
Processing strategy of message queue message loss and repeated message sending
广州市召开安全生产工作会议
About IPSec
OSPF exercise Report
[statistical learning method] learning notes - logistic regression and maximum entropy model
Realize all, race, allsettled and any of the simple version of promise by yourself
2022广东省安全员A证第三批(主要负责人)考试练习题及模拟考试