UNPKG

puppeteer-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.

36 lines (30 loc) 860 B
declare module "puppeteer-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; } 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; } }