UNPKG

yegor-real-browser

Version:

This package is designed to bypass puppeteer's bot-detecting captchas such as Cloudflare. It acts like a real browser and can be managed with puppeteer.

37 lines (31 loc) 1.03 kB
declare module "yegor-real-browser" { import type { Browser, Page } from "rebrowser-puppeteer-core"; import type { GhostCursor } from "ghost-cursor"; export function connect(options: Options): Promise<ConnectResult>; interface PageWithCursor extends Page { realClick: GhostCursor["click"]; realCursor: GhostCursor; disableTurnstileSolver: () => void; } type ConnectResult = { browser: Browser; page: PageWithCursor; }; interface Options { args?: string[]; headless?: boolean; customConfig?: import("chrome-launcher").Options; proxy?: ProxyOptions; turnstile?: boolean; connectOption?: import("rebrowser-puppeteer-core").ConnectOptions; disableXvfb?: boolean; plugins?: import("puppeteer-extra").PuppeteerExtraPlugin[]; ignoreAllFlags?: boolean; } interface ProxyOptions { host: string; port: number; username?: string; password?: string; } }