mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use chrome-aws-lambda args
This commit is contained in:
parent
47c3578820
commit
45a2a1393f
2 changed files with 3 additions and 9 deletions
|
|
@ -6,6 +6,7 @@
|
|||
require('dotenv').config();
|
||||
const Url = require('url');
|
||||
const puppeteer = require('puppeteer-extra');
|
||||
const chromium = require('chrome-aws-lambda');
|
||||
const axios = require('axios');
|
||||
const jwt = require('jsonwebtoken');
|
||||
const { promisify } = require('util');
|
||||
|
|
@ -52,15 +53,7 @@ const userAgentForUrl = (url) => {
|
|||
// launch Puppeteer
|
||||
const getBrowserPromise = (async () => {
|
||||
return puppeteer.launch({
|
||||
args: [
|
||||
'--disable-gpu',
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-setuid-sandbox',
|
||||
'--no-first-run',
|
||||
'--no-sandbox',
|
||||
'--no-zygote',
|
||||
'--single-process',
|
||||
],
|
||||
args: chromium.args,
|
||||
defaultViewport: { height: 1080, width: 1920 },
|
||||
executablePath: process.env.CHROMIUM_PATH ,
|
||||
headless: true, // process.env.LAUNCH_HEADLESS ? true : false,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
"ad-block-js": "^0.0.2",
|
||||
"axios": "^0.26.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"chrome-aws-lambda": "^10.1.0",
|
||||
"express": "^4.17.1",
|
||||
"jsdom": "^19.0.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
|
|
|
|||
Loading…
Reference in a new issue