Skip to content

Packages everything you need to run PuppeteerSharp in AWS Lambda on Chromium

License

Notifications You must be signed in to change notification settings

litmus/HeadlessChromium.Puppeteer.Lambda.Dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HeadlessChromium.Puppeteer.Lambda.Dotnet

Packages everything you need to run PuppeteerSharp in AWS Lambda on Chromium into a Nuget Package

Build status CodeFactor Nuget status

Description

The chromium binary for this project has been extracted from the NPM project Sparticuz/chromium. It is automatically extracted to /tmp/chromium at runtime. This project requires the lambda runtime to be configured as netcoreapp3.1 or dotnet6. For now, the chromium binary only supports x86_64

Usage

Screenshot a URL as a byte[].

var browserLauncher = new HeadlessChromiumPuppeteerLauncher(logger);

using(var browser = await browserLauncher.LaunchAsync())
using(var page = await browser.NewPageAsync())
{
    await page.GoToAsync(url);
    return await page.ScreenshotDataAsync();
}

For more use cases see the PuppeteerSharp documentation

Projects using this library

These projects are using this library and are good examples of how you might consume this nuget package

Building

To build locally:

.\build.ps1 -Target Build

About

Packages everything you need to run PuppeteerSharp in AWS Lambda on Chromium

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published