Skip to content

Instantly share code, notes, and snippets.

@zhuangya
Created August 28, 2014 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhuangya/5b1d61ed63a83f4264c2 to your computer and use it in GitHub Desktop.
Save zhuangya/5b1d61ed63a83f4264c2 to your computer and use it in GitHub Desktop.
'use strict';
var _ = require('lodash');
var through = require('through');
var JSONStream = require('JSONStream');
var fs = require('fs');
fs.createReadStream(__dirname + '/vc.cn.har').pipe(JSONStream.parse('log.entries')).pipe(through(function (dat) {
_.each(dat, function (d) {
if (d.response.status === 301) {
console.log(d.request.url);
}
});
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment