介绍
driver.get("https://bot.sannysoft.com/")
可能,您会立即使用大多数测试,幸运的是,很容易配置将通过所有这些测试并完全无法检测到的刮板。 selechenium-streaph Seleenium-STERLATH
是用于避免检测的Python软件包。简单...pip install selenium-stealth
并遵循以下配置:
stealth(driver,
user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36(KHTML, like Gecko) Chrome/83.0.4103.53 Safari/537.36',
languages=["en-US", "en"],
vendor="Google Inc.",
platform="Win32",
webgl_vendor="Intel Inc.",
renderer="Intel Iris OpenGL Engine",
fix_hairline=True,
)
MoreInformation 如果您仍然被阻止,我建议您查看
兰多姆 - 用户代理库以在硒配置的“ user_agent”变量中循环您的用户代理。否则,您可以为代理提供商付费完全掩盖您的IP。尽管请记住,但
二耐网络目前没有selenium配置。
代理网络硒配置的信息:Pythonselenium代理网络
python selenium aws lambda更改webgl供应商/渲染器,用于无法检测到的无头刮板 我应该写这件事:''隐形(驱动程序, user_agent:'Mozilla/5.0(Windows NT 10.0; Win64; X64)AppleWebkit/537.36(Khtml,像Gecko一样)Chrome/83.0.4103.53 Safari/537.36',, 语言= [“ en-us”,“ en”], 供应商=“ Google Inc.”, 平台=“ win32”, webgl_vendor =“ Intel Inc.”, Renderer =“ Intel Iris OpenGL引擎”, fix_hairline = true, )''如果我不通过Impreva测试,则在我的脚本开始时?