import { extractMarkdown } from "@intuned/browser";
import { BrowserContext, Page } from "playwright";
interface Params {}
export default async function handler(
params: Params,
page: Page,
context: BrowserContext
) {
await page.goto("https://books.toscrape.com/");
const headerLocator = page.locator("h1").first(); // First title on the page
const markdown = await extractMarkdown({ source: headerLocator }); // Extract markdown from the first title
console.log(markdown);
return markdown;
}