英文:
How to open a website protected by Cloudflare using Chromedp?
问题
如何打开由Cloudflare保护的网站?例如https://coinlist.co,
我只想使用带有headless = true标志的Chromepd打开https://coinlist.co,但是Chrome提示“Chrome正在被自动化测试软件控制”,并且Chrome页面在Cloudflare页面上被阻止。看起来Cloudflare可以检测到Chromedp。
英文:
How to open a website protected by Cloudflare? such as https://coinlist.co,
I just want to open https://coinlist.co using Chromepd with headless = true flag, but Chrome prompts that "Chrome is being controlled by automated test software", and the chrome page blocks at the Cloudflare page. It seems like Cloudflare can detect the Chromedp.
答案1
得分: 2
你可以尝试使用基于puppeteer stealth插件的github.com/go-rod/stealth包,示例如下:
import (
"github.com/chromedp/chromedp"
"github.com/go-rod/stealth"
)
chromedp.Run(
ctx,
chromedp.Evaluate(stealth.JS, nil),
)
如果这不起作用,你可能需要使用一个验证码解决器,比如2captcha。
英文:
You can try using the github.com/go-rod/stealth package based on the puppeteer stealth plugin like below:
import (
"github.com/chromedp/chromedp"
"github.com/go-rod/stealth"
)
chromedp.Run(
ctx,
chromedp.Evaluate(stealth.JS, nil),
)
If that doesn't work then you may need to use a captcha solver like 2captcha.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论