小编Aei*_*ius的帖子

cloudcraper.exceptions.CloudflareChallengeError:检测到 Cloudflare 版本 2 挑战。我在 python 中使用 cloudcraper 模块时出错

所以我试图绕过一个网站的 cloudflare 保护来从他们那里抓取一些项目,但Cloudscraper python 模块不起作用。

每当我运行它时,我都会收到此错误:

cloudscraper.exceptions.CloudflareChallengeError: Detected a Cloudflare version 2 challenge, This feature is not available in the opensource (free) version.
Run Code Online (Sandbox Code Playgroud)

这是我正在使用的简化代码:

import cloudscraper
from bs4 import BeautifulSoup as soup


url = "http://adventurequest.life/"
scraper = cloudscraper.create_scraper()
html = scraper.get(url).text
page_soup = soup(html, "html.parser")
print(page_soup)
Run Code Online (Sandbox Code Playgroud)

你们知道如何解决这个问题吗?

python beautifulsoup cloudflare

5
推荐指数
1
解决办法
5256
查看次数

标签 统计

beautifulsoup ×1

cloudflare ×1

python ×1