Home Reference Source
import PuppeteerWARCGenerator from 'node-warc/lib/writers/puppeteer.js'
public class | source

PuppeteerWARCGenerator

Extends:

WARCWriterBase → PuppeteerWARCGenerator

WARC Generator for use with puppeteer

See:

Constructor Summary

Public Constructor
public

constructor(defaultOpts: WARCFileOpts)

Create a new PuppeteerWARCGenerator

Member Summary

Private Members
private

_UP: URL

Method Summary

Public Methods
public

async generateWARC(capturer: PuppeteerRequestCapturer, genOpts: WARCGenOpts): Promise<void>

public

async generateWarcEntry(request: Request): Promise<void>

Generate a WARC record

Public Constructors

public constructor(defaultOpts: WARCFileOpts) source

Create a new PuppeteerWARCGenerator

Params:

NameTypeAttributeDescription
defaultOpts WARCFileOpts
  • optional
  • nullable: true

Private Members

private _UP: URL source

Public Methods

public async generateWARC(capturer: PuppeteerRequestCapturer, genOpts: WARCGenOpts): Promise<void> source

Params:

NameTypeAttributeDescription
capturer PuppeteerRequestCapturer

The Puppeteer request capturer that contains requests to be serialized to the WARC

genOpts WARCGenOpts

Options for generating the WARC and optionally generating WARC info, WARC info + Webrecorder Player bookmark list, metadata records

Return:

Promise<void>

A Promise that resolves when WARC generation is complete

public async generateWarcEntry(request: Request): Promise<void> source

Generate a WARC record

Params:

NameTypeAttributeDescription
request Request

A Puppeteer Request object

Return:

Promise<void>