Overmiind / Puppeteer-sharp-extra

Plugin framework for PuppeteerSharp
MIT License
188 stars 52 forks source link
browser browser-automation browser-extension browser-testing chrome chrome-headless headless-chrome netcore netcore31 puppeteer puppeteer-extra recaptcha stealth-client

PuppeteerExtraSharp

NuGet Badge

Puppeteer extra sharp is a .NET port of the Node.js library

Quickstart

// Initialization plugin builder
var extra = new PuppeteerExtra(); 

// Use stealth plugin
extra.Use(new StealthPlugin());   

// Launch the puppeteer browser with plugins
var browser = await extra.LaunchAsync(new LaunchOptions()
{
    Headless = false
});

// Create a new page
var page = await browser.NewPageAsync();

await page.GoToAsync("http://google.com");

// Wait 2 second
await page.WaitForTimeoutAsync(2000);

// Take the screenshot
await page.ScreenshotAsync("extra.png");

Plugin list

🏴 Puppeteer stealth plugin

📃 Puppeteer anonymize UA plugin

💀Puppeteer recaptcha plugin

🔧Puppeteer block resources plugin

More plugins coming soon

API

Use(IPuppeteerExtraPlugin)

Adds a new plugin to plugins list and register it.

LaunchAsync(LaunchOptions)

var browser = new PuppeteerExtra().LaunchAsync(new LaunchOptions());

ConnectAsync(ConnectOptions)

GetPlugin()