How do I extract the data-sitekey property on a site that uses Cloudflare Turnstile? I used the HTTP Request node and it doesn’t look like data-sitekey is visible on the page. I need to find data-sitekey so I can send it to 2captcha.com to solve captcha
Hi @Ruriko HTTP node only fetches raw data it got from the website, this data very likely contains the data-sitekey as most of the times you manually have to run javascript query in browser to get that key, specially in cloudflare they key is mostly hidden, this is not certain as you may get the site-key from some sites but most of the times the results would be empty. Using some other service to fetch that for you would be a good approach at scale.
I tried this on my end using the attached URL in your workflow, but I couldn’t even find it, It sounds tricky, either I’m missing something or Cloudflare is doing its bot-detection thing, I’m not really sure..
Since your goal is to get the website content that requires solving a CAPTCHA, and you asked for a solution, I would recommend using a browser-as-a-service like browserless.io, They include CAPTCHAs solving in their generous free plan, so you just need to call the BrowserQL endpoint:
https://production-sfo.browserless.io/stealth/bql
With a query like this:
{
"query": "mutation { goto(url: \"{{ $json.url }}") { status } solve { solved } waitForTimeout(time: 8000) { time } html { html } }"
}