UNPKG

clicks-recaptcha-solver

Version:

A powerful automation tool for solving Google reCAPTCHA challenges using Playwright and Puppeteer. This package intelligently detects and simulates human-like interactions, including mouse movements and precise clicks, to bypass reCAPTCHA v2 and other sim

25 lines (24 loc) 958 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isFoundReCaptchaBadge = isFoundReCaptchaBadge; /** * Function to check for the presence of a reCAPTCHA badge on the page. * * @async * @function isFoundReCaptchaBadge * @param {object} page - The page object (e.g., in Puppeteer) where the element will be searched. * @returns {Promise<boolean>} Returns a promise with a boolean value: * true if the reCAPTCHA badge is found, or false if not. * * @example * const isBadgePresent = await isFoundReCaptchaBadge(page); * console.log(isBadgePresent); // true or false */ async function isFoundReCaptchaBadge(page) { // Perform a search for the reCAPTCHA badge on the provided page const recaptchaBadge = await page.evaluate(() => { const badge = document.querySelector('iframe[src*="https://www.google.com/recaptcha/api2"]'); return badge ? true : false; }); return recaptchaBadge; }