puppeteer-stealth-launcher
v1.1.0
Published
A lightweight utility to launch a stealthy [Puppeteer](https://pptr.dev) browser instance, pre-configured with evasions and adblocking capabilities.
Readme
puppeteer-stealth-launcher
A lightweight utility to launch a stealthy Puppeteer browser instance, pre-configured with evasions and adblocking capabilities.
It uses the following plugins out of the box:
⚙️ Installation
You can install the package using your favorite package manager:
# using npm
npm install puppeteer-stealth-launcher
# using yarn
yarn add puppeteer-stealth-launcher
# using pnpm
pnpm add puppeteer-stealth-launcherNote: Depending on your setup, you might also need to install the browser runtime:
npx puppeteer browsers install chrome
📖 Usage
import launchBrowser from 'puppeteer-stealth-launcher'
// Launch the browser instance (Promise-based)
const browser = await launchBrowser({
headless: false, // Default is false
args: ['--start-maximized'] // Additional launch arguments
hide: false // Disable hide browser window
})
const page = await browser.newPage()
await page.goto('https://bot.sannysoft.com')
// Test stealth mode
await page.screenshot({ path: 'stealth-test.png', fullPage: true })
await browser.close()🛠️ Options
The launchBrowser(options) function accepts an optional configuration object as the Puppeteer LaunchOptions.
Default values:
headless(boolean): Whether to run the browser in headless mode. Default tofalse.hide(boolean): Use argument--window-position=-2400,-2400to move the browser window off-screen and avoid user interaction. Default totrue.args(string[]): Additional command line arguments to pass to the browser instance. Default to essential arguments:--no-sandbox--disable-setuid-sandbox--disable-search-engine-choice-screen--disable-dev-shm-usage
📄 License
This project is licensed under the MIT License.
