@extra/recaptcha
Version:
A plugin for playwright & puppeteer to solve reCAPTCHAs and hCaptchas automatically.
28 lines (27 loc) • 1.47 kB
TypeScript
import { AutomationExtraPlugin } from 'automation-extra-plugin';
import * as types from './types';
export declare const BuiltinSolutionProviders: types.SolutionProvider[];
/**
* A plugin to automatically detect and solve reCAPTCHAs.
* @noInheritDoc
*/
export declare class RecaptchaPlugin extends AutomationExtraPlugin {
static id: string;
constructor(opts: Partial<types.PluginOptions>);
get defaults(): types.PluginOptions;
get contentScriptOpts(): types.ContentScriptOpts;
private _generateContentScript;
findRecaptchas(page: types.Page | types.Frame): Promise<types.FindRecaptchasResult>;
getRecaptchaSolutions(captchas: types.CaptchaInfo[], provider?: types.SolutionProvider): Promise<any>;
enterRecaptchaSolutions(page: types.Page | types.Frame, solutions: types.CaptchaSolution[]): Promise<types.EnterRecaptchaSolutionsResult>;
solveRecaptchas(page: types.Page | types.Frame): Promise<types.SolveRecaptchasResult>;
private _addCustomMethods;
beforeContext(options: types.Playwright.BrowserContextOptions, browser: types.Browser): Promise<void>;
onPageCreated(page: types.Page): Promise<void>;
private _addCustomMethodsToPages;
/** Add additions to already existing pages and frames */
onBrowser(browser: types.Browser): Promise<void>;
}
/** Default export, RecaptchaPlugin */
declare const defaultExport: (options?: Partial<types.PluginOptions>) => RecaptchaPlugin;
export default defaultExport;