Class that extends the BaseDocumentLoader class and implements the DocumentLoader interface. It represents a document loader for scraping web pages using Puppeteer.

const loader = new PuppeteerWebBaseLoader("https:exampleurl.com", {
launchOptions: {
headless: true,
},
gotoOptions: {
waitUntil: "domcontentloaded",
},
});
const screenshot = await loader.screenshot();

Hierarchy (view full)

Implements

Constructors

Properties

Methods

Constructors

Properties

options: undefined | PuppeteerWebBaseLoaderOptions
webPath: string

Methods

  • Static method that imports the necessary Puppeteer modules. It returns a Promise that resolves to an object containing the imported modules.

    Returns Promise<{
        launch: ((options?: PuppeteerLaunchOptions) => Promise<Browser>);
    }>

    Promise that resolves to an object containing the imported Puppeteer modules.