/var/www/html/whatsappweb/node_modules/whatsapp-web.js/src/Client.js
Util.setFfmpegPath(this.options.ffmpegPath);
}
/**
* Sets up events and requirements, kicks off authentication request
*/
async initialize() {
let [browser, page] = [null, null];
if(this.options.puppeteer && this.options.puppeteer.browserWSEndpoint) {
browser = await puppeteer.connect(this.options.puppeteer);
browser = await puppeteer.connect({
args:['--no-sandbox'],
executablePath: '/usr/bin/google-chrome-stable'
});
page = await browser.newPage();
} else {
browser = await puppeteer.launch(this.options.puppeteer);
browser = await puppeteer.launch({
args:['--no-sandbox'],
executablePath: '/usr/bin/google-chrome-stable'
});
page = (await browser.pages())[0];
}
page.setUserAgent(this.options.userAgent);
this.pupBrowser = browser;
this.pupPage = page;
if (this.options.session) {
await page.evaluateOnNewDocument(
No comments:
Post a Comment