solved puppeter problem in railway

This commit is contained in:
2022-11-12 18:58:59 -03:00
parent 23ee708a14
commit ee340cb9c5
3 changed files with 65 additions and 1 deletions

View File

@@ -162,7 +162,9 @@ module.exports = {
const pagesWithErrorScrapping = [];
for (const countryPage of countryPages) {
try {
const browser = await puppeteer.launch() ;
const browser = await puppeteer.launch({
args: ['--no-sandbox'],
}) ;
const page = await browser.newPage();
const searchUrl = countryPage.searchUrl.replace('%S', product);
const response = await page.goto(searchUrl, { waitUntil: 'domcontentloaded' });