ManagedCode.KernelMemory.Playwright
1.0.5
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ManagedCode.KernelMemory.Playwright --version 1.0.5
NuGet\Install-Package ManagedCode.KernelMemory.Playwright -Version 1.0.5
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.5" />
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.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ManagedCode.KernelMemory.Playwright, 1.0.5"
#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.5 // Install ManagedCode.KernelMemory.Playwright as a Cake Tool #tool nuget:?package=ManagedCode.KernelMemory.Playwright&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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.
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
- 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();
- Use the
ImportWebPageAsTextWithPlaywrightAsync
orImportWebPageAsImageWithPlaywrightAsync
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 | Versions 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.
-
net8.0
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- Microsoft.KernelMemory.Abstractions (>= 0.26.240104.1)
- Microsoft.KernelMemory.Core (>= 0.26.240121.1)
- Microsoft.Playwright (>= 1.41.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.