Added executable path
This commit is contained in:
@@ -6,11 +6,12 @@ const userAgent = require('user-agents');
|
||||
(async () => {
|
||||
|
||||
const url = process.argv[2];
|
||||
const browser = await puppeteer.launch();
|
||||
const binary = argv[3];
|
||||
const browser = await puppeteer.launch({ executablePath: binary });
|
||||
const page = await browser.newPage();
|
||||
await page.setUserAgent(userAgent.random().toString());
|
||||
|
||||
await page.goto(url, {waitUntil: 'load'});
|
||||
await page.goto(url, { waitUntil: 'load' });
|
||||
|
||||
const html = await page.content();
|
||||
|
||||
|
Reference in New Issue
Block a user