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

PuppeteerCDPWARCGenerator

Extends:

WARCWriterBase → PuppeteerCDPWARCGenerator

WARC Generator for use with puppeteer

See:

Method Summary

Public Methods
public

async generateWARC(capturer: PuppeteerCDPRequestCapturer, client: CDPSession, genOpts: WARCGenOpts): Promise<void>

public

async generateWarcEntry(nreq: CDPRequestInfo, client: CDPSession): Promise<void>

Generate a WARC record

Public Methods

public async generateWARC(capturer: PuppeteerCDPRequestCapturer, client: CDPSession, genOpts: WARCGenOpts): Promise<void> source

Params:

NameTypeAttributeDescription
capturer PuppeteerCDPRequestCapturer

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

client CDPSession

A CDPSession connected to the target the response bodies will be retrieved from

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(nreq: CDPRequestInfo, client: CDPSession): Promise<void> source

Generate a WARC record

Params:

NameTypeAttributeDescription
nreq CDPRequestInfo

The captured HTTP info

client CDPSession

A CDPSession connected to the target the response bodies will be retrieved from

Return:

Promise<void>