ManagedCode.KernelMemory.Playwright 1.0.4

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ManagedCode.KernelMemory.Playwright --version 1.0.4                
NuGet\Install-Package ManagedCode.KernelMemory.Playwright -Version 1.0.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ManagedCode.KernelMemory.Playwright" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ManagedCode.KernelMemory.Playwright --version 1.0.4                
#r "nuget: ManagedCode.KernelMemory.Playwright, 1.0.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ManagedCode.KernelMemory.Playwright as a Cake Addin
#addin nuget:?package=ManagedCode.KernelMemory.Playwright&version=1.0.4

// Install ManagedCode.KernelMemory.Playwright as a Cake Tool
#tool nuget:?package=ManagedCode.KernelMemory.Playwright&version=1.0.4                

KernelMemory.Playwright

KernelMemory.Playwright is an open-source project that provides methods to import websites as text or images into memory. It leverages the power of the Playwright library to interact with web pages programmatically.

NuGet Package

Features

  • Import web pages as text: This feature allows you to fetch the entire text content of a web page and store it in memory.
  • Import web pages as images: This feature enables you to take a screenshot of a web page and store it in memory.

How to Use

  1. Install the package into your project.

You can install the ManagedCode.KernelMemory.Playwright NuGet package by running the following command in your terminal:

dotnet add package ManagedCode.KernelMemory.Playwright

Add Playwright to your services.

services.WithPlaywright();
  1. Use the ImportWebPageAsTextWithPlaywrightAsync or ImportWebPageAsImageWithPlaywrightAsync methods to import a web page as text or image respectively.

Example

// Import a web page as text
string documentId = await memory.ImportWebPageAsTextWithPlaywrightAsync("https://example.com");

// Import a web page as an image
string documentId = await memory.ImportWebPageAsImageWithPlaywrightAsync("https://example.com");

// Get the content of a web page as text
string pageText = await memory.GetWebPageContentAsTextAsync("https://example.com");

// Get the content of a web page as an image
byte[] pageImage = await memory.GetWebPageContentAsImageAsync("https://example.com");
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 1,408 2/3/2024
1.0.5 115 2/2/2024
1.0.4 128 2/2/2024
1.0.3 189 2/1/2024
1.0.2 107 1/31/2024
1.0.1 221 1/30/2024
1.0.0 107 1/30/2024