当前位置:网站首页>[爬虫]使用selenium时,躲避脚本检测
[爬虫]使用selenium时,躲避脚本检测
2022-07-07 10:33:00 【大西瓜和小栗子】
问题现象
在一次脚本尝试登陆中有一个滑块,不管怎么拖动,它都会报错误。即使是脚本填入数据,你自己拖动滑块也会一直报错。
问题解决
这个问题主要是由于应用对脚本做了检测。检测的依据是
window.navigator.webdriver
以下这张图是修改后的,没设置前都是返回true.
在请求页面的时候,先把options设置一下。以下代码只对chrome 88版以上有用。
脚本
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")
边栏推荐
- Decrypt gd32 MCU product family, how to choose the development board?
- 跨域问题解决方案
- Processing strategy of message queue message loss and repeated message sending
- Vxlan static centralized gateway
- [Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
- The IDM server response shows that you do not have permission to download the solution tutorial
- 【二叉树】删点成林
- About sqli lab less-15 using or instead of and parsing
- sql-lab (54-65)
- Vxlan 静态集中网关
猜你喜欢
leetcode刷题:二叉树23(二叉搜索树中的众数)
leetcode刷题:二叉树20(二叉搜索树中的搜索)
数据库系统原理与应用教程(010)—— 概念模型与数据模型练习题
【统计学习方法】学习笔记——支持向量机(下)
Static vxlan configuration
Static routing assignment of network reachable and telent connections
[deep learning] image multi label classification task, Baidu paddleclas
[pytorch practice] use pytorch to realize image style migration based on neural network
Tutorial on the principle and application of database system (011) -- relational database
"Series after reading" my God! It's so simple to understand throttling and anti shake~
随机推荐
Vxlan 静态集中网关
Upgrade from a tool to a solution, and the new site with praise points to new value
Sort out the garbage collection of JVM, and don't involve high-quality things such as performance tuning for the time being
Several methods of checking JS to judge empty objects
SQL blind injection (WEB penetration)
AirServer自动接收多画面投屏或者跨设备投屏
Processing strategy of message queue message loss and repeated message sending
【PyTorch实战】图像描述——让神经网络看图讲故事
Epp+dis learning road (2) -- blink! twinkle!
Sign up now | oar hacker marathon phase III midsummer debut, waiting for you to challenge
Static comprehensive experiment
File upload vulnerability - upload labs (1~2)
leetcode刷题:二叉树21(验证二叉搜索树)
ES底层原理之倒排索引
Tutorial on the principle and application of database system (011) -- relational database
(to be deleted later) yyds, paid academic resources, please keep a low profile!
GCC compilation error
【统计学习方法】学习笔记——支持向量机(下)
In the small skin panel, use CMD to enter the MySQL command, including the MySQL error unknown variable 'secure_ file_ Priv 'solution (super detailed)
【统计学习方法】学习笔记——第五章:决策树