프로젝트
GitHub에서 보기
fouber/page-monitor
소개
PhantomJS로 웹 페이지를 캡처하고 DOM 변경 사항을 비교합니다 ♨
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPage Monitor
capture webpage and diff the dom change with phantomjs
Effects
Element Add

Element Removed

Text Changed

Style Changed

Make UI to show diffs of history

Usage
First of all, install phantomjs, page-monitor relys on phantomjs to render webpage and genenrate screenshot. DO NOT use
npmto install phantomjs on winidows, it can't be launched byspawn.
var Monitor = require('page-monitor');
var url = 'http://www.google.com';
var monitor = new Monitor(url);
monitor.capture(function(code){
console.log(monitor.log); // from phantom
console.log('done, exit [' + code + ']');
});
API
Monitor
var monitor = new Monitor(url [, options]);
see the default options here: https://github.com/fouber/page-monitor/blob/master/index.js , you can override any option for your monitoring.
monitor.capture(callback [, noDiff]);
caputure webpage and save screenshot, then diff with last save.
var monitor = new Monitor(url, options);
monitor.on('debug', function (data) {
console.log('[DEBUG] ' + data);
});
monitor.on('error', function (data) {
console.error('[ERROR] ' + data);
});
monitor.capture(function(code){
console.log(monitor.log.info); // diff result
console.log('[DONE] exit [' + code + ']');
});
monitor.diff(left, right, callback);
diff change between left(date.getTime()) and right(date.getTime()).
var monitor = new Monitor(url, options);
monitor.on('debug', function (data) {
console.log('[DEBUG] ' + data);
});
monitor.on('error', function (data) {
console.error('[ERROR] ' + data);
});
monitor.diff(1408947323420, 1408947556898, function(code){
console.log(monitor.log.info); // diff result
console.log('[DONE] exit [' + code + ']');
});
events
var monitor = new Monitor(url);
monitor.on('debug', function (data) {
console.log('[DEBUG] ' + data);
});
monitor.on('error', function (data) {
console.error('[ERROR] ' + data);
});
debug: debug from phantomnotice: console from webpageinfo: info from phantomwarning: error from webpageerror: error from phantom
관련 프로젝트 살펴보기
불러오는 중…