0
votes

I have this code for my Google Chrome extension which solves reCAPTCHA automatically.

"use strict"

var sid = setInterval(function () {
    if (window.location.href.match(/https:\/\/www.google.com\/recaptcha\/api\d\/anchor/) && $("#recaptcha-anchor div.recaptcha-checkbox-checkmark").length
            && $("#recaptcha-anchor div.recaptcha-checkbox-checkmark").is(':visible')  && isScrolledIntoView($("#recaptcha-anchor div.recaptcha-checkbox-checkmark").get(0)))
        {
            var execute = true;

            if (sessionStorage.getItem('accesstime'))
                {
                    if (new Date().getTime() - sessionStorage.getItem('accesstime') < 7000)
                        {
                            execute = false;
                        }
                }

            if (execute)
                {
                    $("#recaptcha-anchor div.recaptcha-checkbox-checkmark").click();                    
                    sessionStorage.setItem('accesstime', new Date().getTime());
                }
                clearInterval(sid);

        }
}, 500);

My question is...

From the above code. How do I get the data-sitekey and page url?

1

1 Answers

3
votes

I know this is old, but for people in same situation: Use your account of Google(Gmail)

go to this link https://www.google.com/recaptcha/intro/v3beta.html

- use the button Myrecaptcha
- register a new site
- give a label "my site label"
- Choose the type of reCAPTCHA
- enter the domain for you want use the captcha
- check the Accept the reCAPTCHA Terms of Service.
- check or not the send alerts to owners
- Click "register"

That´s all when finish you will see intructions and your data-sitekey.