0.0.1 • Published 2 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
2 years ago
2.0.3
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.0.31
4 years ago
1.0.30
4 years ago
1.0.29
4 years ago
1.0.28
5 years ago
1.0.27
5 years ago
1.0.26
5 years ago
1.0.25
5 years ago
1.0.24
5 years ago
1.0.23
5 years ago
1.0.22
5 years ago
1.0.21
5 years ago
1.0.20
5 years ago
1.0.18
5 years ago
1.0.17
5 years ago
1.0.16
5 years ago
1.0.15
5 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago