honghaitzz11 6 years ago
parent
commit
b1584e21bd
1 changed files with 1 additions and 0 deletions
  1. 1 0
      01-app.js

+ 1 - 0
01-app.js

@@ -3,6 +3,7 @@ const fs = require("fs");
 (async () => {
   const browser = await puppeteer.launch({
     executablePath: './chromium/chrome.exe',
+    args: ['--no-sandbox', '--disable-setuid-sandbox'],
     headless: true, //默认为true(无头),不显示浏览器界面
     slowMo: 200, //减速显示,有时会作为模拟人操作特意减速
     devtools: true //显示开发者工具。页面宽高默认800*600,把开发者工具显示再隐藏页面会占满屏幕,有没有大佬解释下?