har-generator

1.1.3 • Public • Published

HAR Generator

npm version

Simple har scrapper by headless chrome

Requirements

NodeJs 8.0 up

Getting Start

Install package

npm install har-generator

Example

const HarGenerator = require('har-generator');
const options = {
    url: 'https://github.com/Asing1001/har-generator',
    harFolder: 'dist',
    prettify: false,
    jobInterval: 1
}
const harGen = new HarGenerator(options);
harGen.start();

Options

  • Tasks: it is an array, you could add more task to run in parallel
  • url: target url for har
  • harFolder: destination for saving har files
  • prettify: default false, set to true for human read
  • jobInterval: interval in minute for trigger next run

Others

  • If chrome memory high or could not connect
const { cleanup } = require('./lib/harGenerator');
cleanup()

Readme

Keywords

Package Sidebar

Install

npm i har-generator

Weekly Downloads

7

Version

1.1.3

License

MIT

Last publish

Collaborators

  • asing1001