-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
32 lines (28 loc) · 838 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const { Cluster } = require('puppeteer-cluster');
const AppAnalytics = require('./appanalytics');
const PuppeteerCluster = require('./puppeteercluster');
/*
(async () => {
const appAnalytics = new AppAnalytics();
await appAnalytics.loadAppsjson();
const cluster = new PuppeteerCluster(appAnalytics,{
waitDuration:0,
puppeteerClusterOptions:{
concurrency: Cluster.CONCURRENCY_CONTEXT,
maxConcurrency: 2,
puppeteerOptions: {
headless: true,
ignoreHTTPSErrors: true
}
}
});
await cluster.startCluster();
const result = await cluster.analyze('https://thisisdone.com');
console.log(result);
await cluster.closeCluster();
})();*/
module.exports = {
AppAnalytics,
PuppeteerCluster,
Cluster
};