0

im having a problem with getting the parameters which 2captcha api needs to solve the captcha . The type of Captcha Im struggeling with, is Cloudflare Turnstile. There are two hidden parameters you need to get which are : *cdata *and *pagedata *. I have read 2captcha blog about Cloudflare Turnstile and how to get the parameters I need through a js code which is this :

const i = setInterval(() => {
                if (window.turnstile) {
                    clearInterval(i);
                    window.turnstile.render = (a, b) => {
                        x = b;
                        return 'foo';
                    };
                }
            }, 50);

. and they have mentioned that I should run this code before the load of the cloudflare widget. But I am having problem with this code i gotta run on that specific time. I can not run this code on the page with Selenium or any other Module or Library that works on browser. How can i run this code on the right time ? preferebly in python. Thanx for helping.

I have tried any type of before load script injection on the page but they did not work. Such as : BroserMob Proxy and etc

parsa
  • 1
  • 1

0 Answers0