因此,我试图绕过网站的cloudflare保护,从中删除一些项目,但Cloudscraperpython模块不起作用
无论何时运行,我都会收到以下错误:
cloudscraper.exceptions.CloudflareChallengeError: Detected a Cloudflare version 2 challenge, This feature is not available in the opensource (free) version.
下面是我正在使用的简化代码:
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)
你们知道怎么解决这个问题吗
我在使用scrapy+cloudscraper时遇到了相同的错误,但随后我将cookie_enable=true设置得很好:
错误
之前:
之后:
但是在bs4中,Cookies是默认添加的,所以我尝试了你的代码,发现它是正常的
也许您应该检查您的机器opennssl版本,然后更新或升级cloudscraper版本
我的cloudscraper版本是:cloudscraper====>;1.2.58
相关问题 更多 >
编程相关推荐