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

27 lines (24 loc) 929 B
import { Page } from 'playwright-core'; /** * 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 */ export async function isFoundReCaptchaBadge(page: 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; }