From 184461e27b62d0e57e0da4679b56b75e3f3a6535 Mon Sep 17 00:00:00 2001 From: liuweiqing Date: Thu, 4 Apr 2024 23:17:31 +0800 Subject: [PATCH] fix: headless --- pteer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pteer.js b/pteer.js index 65cc05be..ee476aa0 100644 --- a/pteer.js +++ b/pteer.js @@ -15,6 +15,7 @@ function delayClick(time) { (async () => { if (usernames.length !== passwords.length) { + console.log(usernames.length, usernames, passwords.length, passwords); console.log("用户名和密码的数量不匹配!"); return; } @@ -31,7 +32,7 @@ function delayClick(time) { async function launchBrowserForUser(username, password) { try { const browser = await puppeteer.launch({ - headless: false, + headless: true, args: ["--no-sandbox", "--disable-setuid-sandbox"], //linux需要 defaultViewport: { width: 1280,