【问题标题】:Selenium webdriver blocked Cloudflare. PythonSelenium webdriver 阻止了 Cloudflare。 Python
【发布时间】:2021-10-01 16:42:27
【问题描述】:

我正在使用 selenium 分析其他站点,而在这些站点上,cloudflare 会阻止它。如何让 Cloudflare 不阻塞 webdriver?

Versions used:: 93, 65, 70, 86。每个人都不工作

无法使用 сhromedriver 参数:

--disable-blink-features=AutomationControlled

--disable-setuid-sandbox

--no-zygote

还有很多其他

ProtonVPN、windscribe VPN:

我在每个 VPN 上都使用了3-4 different IPs。阻止每个。

在 Winscribe 中,我使用了付费帐户 - 无论如何都会阻止

photo

【问题讨论】:

  • Cloudflare 提供机器人检测服务。在运行自动化测试时关闭它。
  • 我正在使用 selenium 解析其他站点,这些站点已阻止 selenium

标签: python selenium webdriver


【解决方案1】:

您可以切换到 Playwright 并在无头模式下使用 Firefox 或 WebKit(仍然可以检测到 Chromium)。

【讨论】:

  • 我们的项目使用的是 Python 3.6,我们需要为 selenium 和 chrome 找到解决方案,因为我们项目的核心是为 chrome 编写的
  • 决定使用它,因为他们没有找到任何其他选择。谢谢
  • 另外,您可以更改用户代理,也许它会起作用。
猜你喜欢
  • 2016-06-14
  • 2014-12-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-07
  • 1970-01-01
相关资源
最近更新 更多