如何在Selence中绕过Cloudflare僵尸防护 [英] How to bypass Cloudflare bot protection in selenium

查看:0
本文介绍了如何在Selence中绕过Cloudflare僵尸防护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从一个网站获取一些信息,只是出于教育目的,但由于保护,我不能发送请求。我得到的典型页面是先显示Check-Your-Browser页面,然后我会被反复重定向。 我如何才能绕过此保护?

推荐答案

我很久以前就遇到过这个问题,我能够解决它。使用下面的代码并享受:)

options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_argument("--disable-blink-features=AutomationControlled")
driver = webdriver.Chrome(options=options, executable_path=r"webdriverchromedriver.exe")

/编辑/ 这种方式现在不起作用了!

这篇关于如何在Selence中绕过Cloudflare僵尸防护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆