1.1.3 • Published 6 years ago
har-generator v1.1.3
HAR Generator
Simple har scrapper by headless chrome
Requirements
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 parallelurl
: target url for harharFolder
: destination for saving har filesprettify
: defaultfalse
, set totrue
for human readjobInterval
: interval in minute for trigger next run
Others
- If chrome memory high or could not connect
const { cleanup } = require('./lib/harGenerator');
cleanup()