如何获取 Google reCAPTCHA v2 data-sitekey?

How to get Google reCAPTCHA v2 data-sitekey?

我的 Google Chrome 扩展程序有此代码,可自动解决 reCAPTCHA。

"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);

我的问题是...

来自上面的代码。如何获取数据站点密钥和页面 url?

我知道这是旧的,但对于处于相同情况的人: 使用您的 Google(Gmail)

帐户

转到此 link https://www.google.com/recaptcha/intro/v3beta.html

- 使用按钮 Myrecaptcha
- 注册一个新站点
- 给个标签"my site label"
- 选择验证码类型
- 输入您要使用验证码的域
- 检查接受 reCAPTCHA 服务条款。
- 检查是否向所有者发送警报
- 点击"register"

这就是全部,完成后您将看到说明和您的数据站点密钥。