-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.js
17 lines (16 loc) · 823 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require('dotenv').config();
const { clusterWrapper, helpers } = require('puppeteer-ecommerce-scraper');
(async () => {
await clusterWrapper({
func: async (page, queueData) => {
const webName = helpers.url2FileName(queueData);
await page.goto(queueData, { waitUntil: 'networkidle2' });
await page.screenshot({ path: `./tmp/${webName}.png`, fullPage: true });
console.log(`Check ./tmp/${webName}.png for anti-bot testing result on ${queueData}`);
},
queueEntries: ['https://bot.sannysoft.com', 'https://browserleaks.com/webrtc', 'https://browserleaks.com/javascript'],
proxyEndpoint: process.env.PROXY_ENDPOINT, // Must be in the form of http://username:password@host:port
monitor: false,
useProfile: true, // After solving Captcha, save your profile, so you may avoid doing it next time
});
})();