0.0.1 • Published 3 years ago
webscanner v0.0.1
WebScanner
The missing piece of web automation sessions. The scanner is a chromium process extension that enriches automated sessions with important data using chrome devtools protocol API
Collected data:
- Resources data
- Page content
- Performance and timing metrics
- CSS and JS coverage
- Service workers
- DOM events
- Error logs ...
API
Scanner.getSession(page <object>, opts <object>)
Register chromium process for scanning and returns proxy to the page object
page
\ puppeteer page or an object with the structure of {host: \, port: \ (*requires* --remote-debugging-port flag)opts
\
<page>.scanner.getData()
returns collected data
Example
const puppeteer = require('puppeteer');
const Scanner = require('../src/index');
const URL = 'http://example.com';
(async () => {
const browser = await puppeteer.launch({
args: ['--proxy-server="direct://"', '--proxy-bypass-list=*', '--disable-web-security']
});
let page = await browser.newPage();
page = await Scanner.getSession(page, {
stealth: true,
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3933.0 Safari/537.36',
disableCSP: false,
adBlocking: false,
disableServices: false,
scripts: true,
content: true
});
await page.goto(URL, {waitUntil: 'load'});
await sleep(5);
const data = await page.scanner.getData();
await browser.close();
console.log('data', data);
async function sleep(seconds) {
return await new Promise(resolve => {
setTimeout(resolve, seconds * 1000);
});
}
})();
0.0.1
3 years ago
2.0.3
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.31
6 years ago
1.0.30
6 years ago
1.0.29
6 years ago
1.0.28
6 years ago
1.0.27
6 years ago
1.0.26
6 years ago
1.0.25
6 years ago
1.0.24
6 years ago
1.0.23
6 years ago
1.0.22
6 years ago
1.0.21
6 years ago
1.0.20
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago