@blocklet/crawler 2.1.227 → 2.1.229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -391,13 +391,6 @@ const checkBrowserDownloaded = async () => {
|
|
|
391
391
|
const executablePath = process.env.PUPPETEER_EXECUTABLE_PATH || "/usr/bin/chromium";
|
|
392
392
|
if (_fsExtra.default.existsSync(executablePath)) {
|
|
393
393
|
try {
|
|
394
|
-
const puppeteer2 = await Promise.resolve().then(() => require("puppeteer"));
|
|
395
|
-
const browser2 = await puppeteer2.launch({
|
|
396
|
-
executablePath,
|
|
397
|
-
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
|
398
|
-
headless: true
|
|
399
|
-
});
|
|
400
|
-
await browser2.close();
|
|
401
394
|
logger.info(`System Chromium found and tested successfully: ${executablePath}`);
|
|
402
395
|
return;
|
|
403
396
|
} catch (err) {
|
|
@@ -407,13 +407,6 @@ export const checkBrowserDownloaded = async () => {
|
|
|
407
407
|
const executablePath = process.env.PUPPETEER_EXECUTABLE_PATH || "/usr/bin/chromium";
|
|
408
408
|
if (fs.existsSync(executablePath)) {
|
|
409
409
|
try {
|
|
410
|
-
const puppeteer2 = await import("puppeteer");
|
|
411
|
-
const browser2 = await puppeteer2.launch({
|
|
412
|
-
executablePath,
|
|
413
|
-
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
|
414
|
-
headless: true
|
|
415
|
-
});
|
|
416
|
-
await browser2.close();
|
|
417
410
|
logger.info(`System Chromium found and tested successfully: ${executablePath}`);
|
|
418
411
|
return;
|
|
419
412
|
} catch (err) {
|