Node.js 节点JS,验证码求解

Node.js 节点JS,验证码求解,node.js,discord.js,Node.js,Discord.js,这是我的密码 const https = require('https'); const puppeteer = require('puppeteer-extra') // add recaptcha plugin and provide it your 2captcha token (= their apiKey) // 2captcha is the builtin solution provider but others would work as well. // Please not

这是我的密码

const https = require('https');
const puppeteer = require('puppeteer-extra')

// add recaptcha plugin and provide it your 2captcha token (= their apiKey)
// 2captcha is the builtin solution provider but others would work as well.
// Please note: You need to add funds to your 2captcha account for this to work
const RecaptchaPlugin = require('puppeteer-extra-plugin-recaptcha')

puppeteer.use(
  RecaptchaPlugin({
    provider: {
      id: '2captcha', token: '93...' },
    visualFeedback: true // colorize reCAPTCHAs (violet = detected, green = solved)
  })
  
async function login() {

    global.browser = await puppeteer.launch({
        headless: false,
        slowMo: 10,
        userDataDir: 'C:\\userData',
    });

global.page = await browser.pages();
    const setUserAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36';

    var userAgent = require('user-agents');

    await page[0].setUserAgent(userAgent.toString());
    console.log("Going to Website");
    await page[0].goto("https://www.google.com/recaptcha/api2/demo", {
        waitUntil: 'networkidle2'
    });
        console.log("Solving Captcha");

    await page[0].solveRecaptchas()

  await Promise.all([
    page[0].waitForNavigation()
  ])
}
这是我的代码,我有2captcha余额
上面的代码无法解析验证码,它检测到验证码并将其变为紫色,但无法解析验证码,我需要帮助

我们需要调试详细信息和更多信息。你不能发布一堆代码,说它“不起作用”,然后希望这里的调试细节是什么?是cmd输出吗?代码的哪个特定部分有不需要的行为?您尝试过哪些解决方案?我尝试过在internet上找到的代码,代码的特定部分是:等待页面[0]。solveRecaptchas()