{"id":13560517,"url":"https://github.com/managedcode/KernelMemory.Playwright","last_synced_at":"2025-04-03T16:30:46.535Z","repository":{"id":219979640,"uuid":"750286545","full_name":"managedcode/KernelMemory.Playwright","owner":"managedcode","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-03T13:33:08.000Z","size":48,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-01T11:26:15.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/managedcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-30T10:56:44.000Z","updated_at":"2024-04-17T04:03:00.000Z","dependencies_parsed_at":"2024-04-16T19:09:54.772Z","dependency_job_id":"0814c1e8-952c-4c82-96e0-00c42d7d1f3d","html_url":"https://github.com/managedcode/KernelMemory.Playwright","commit_stats":null,"previous_names":["managedcode/kernelmemory.playwright"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/managedcode%2FKernelMemory.Playwright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/managedcode%2FKernelMemory.Playwright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/managedcode%2FKernelMemory.Playwright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/managedcode%2FKernelMemory.Playwright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/managedcode","download_url":"https://codeload.github.com/managedcode/KernelMemory.Playwright/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247036882,"owners_count":20873038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:00:45.717Z","updated_at":"2025-04-03T16:30:46.224Z","avatar_url":"https://github.com/managedcode.png","language":"C#","readme":"# KernelMemory.Playwright\n\nKernelMemory.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.\n\n[![NuGet Package](https://img.shields.io/nuget/v/ManagedCode.KernelMemory.Playwright.svg)](https://www.nuget.org/packages/ManagedCode.KernelMemory.Playwright)\n\n## Features\n\n- Import web pages as text: This feature allows you to fetch the entire text content of a web page and store it in memory.\n- Import web pages as images: This feature enables you to take a screenshot of a web page and store it in memory.\n\n## How to Use\n\n\n\n1. Install the package into your project.\n\nYou can install the `ManagedCode.KernelMemory.Playwright` NuGet package by running the following command in your terminal:\n\n```bash\ndotnet add package ManagedCode.KernelMemory.Playwright\n```\n\nAdd Playwright to your services. \n```csharp\nservices.WithPlaywright();\n```\n\n2. Use the `ImportWebPageAsTextWithPlaywrightAsync` or `ImportWebPageAsImageWithPlaywrightAsync` methods to import a web page as text or image respectively.\n\n## Example\n\n```csharp\n// Import a web page as text\nstring documentId = await memory.ImportWebPageAsTextWithPlaywrightAsync(\"https://example.com\");\n\n// Import a web page as an image\nstring documentId = await memory.ImportWebPageAsImageWithPlaywrightAsync(\"https://example.com\");\n\n// Get the content of a web page as text\nstring pageText = await memory.GetWebPageContentAsTextAsync(\"https://example.com\");\n\n// Get the content of a web page as an image\nbyte[] pageImage = await memory.GetWebPageContentAsImageAsync(\"https://example.com\");\n```\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanagedcode%2FKernelMemory.Playwright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanagedcode%2FKernelMemory.Playwright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanagedcode%2FKernelMemory.Playwright/lists"}