A mirroring plugin for webcheck.
npm install --save webcheck-mirror
var Webcheck = require('webcheck');
var MirrorPlugin = require('webcheck-mirror');
var plugin = MirrorPlugin({
dest: __dirname + '/mirrored'
ignoreQuery: false,
});
var webcheck = new Webcheck();
webcheck.addPlugin(plugin);
plugin.enable();
// now continue with your code...
filterUrl
: Filter urls that should only crawled once (default all urls).ignoreQuery
: Ignore query in url.
Filters are regular expressions, but the plugin uses only the .test(str)
method to proof. You are able to write
your own and much complexer functions by writing the logic in the test method of an object like this:
opts = {
filterSomething: {
test: function (val) {
return false || true;
}
}
}
reset(undefined | url)
: Reset a specific url, or the complete ignore listignore(url)
: Add a resource to ignore listcheck(url)
: Check if a resource is ignored