Use this file to discover all available pages before exploring further.
Sanitizes and cleans HTML content by removing unwanted elements, attributes, and whitespace.
Provides fine-grained control over each cleaning operation through configurable options.
export declare function sanitizeHtml(options: SanitizeHtmlOptions): string;
import { BrowserContext, Page } from "playwright";import { sanitizeHtml } from "@intuned/browser";interface Params {}export default async function handler( params: Params, page: Page, context: BrowserContext) { await page.goto("https://books.toscrape.com"); const firstRow = page.locator("ol.row").locator("li").first(); // Get the HTML of the first row. const html = await firstRow.innerHTML(); // Sanitize the HTML. const sanitizedHtml = sanitizeHtml({ html }); // Log the sanitized HTML. console.log(sanitizedHtml); // Return the sanitized HTML. return sanitizedHtml;}