Nexchan commited on
Commit
6143544
·
verified ·
1 Parent(s): 390fc89

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -1
index.js CHANGED
@@ -71,7 +71,7 @@ app.get('/puppet', async (req, res) => {
71
  }
72
  try {
73
  const browser = await puppeteer.launch({
74
- headless: true,
75
  args: ['--no-sandbox', '--disable-setuid-sandbox']
76
  });
77
  const page = await browser.newPage();
@@ -87,6 +87,7 @@ app.get('/puppet', async (req, res) => {
87
  });
88
  await page.goto(url, { waitUntil: 'networkidle2' });
89
  const htmlContent = await page.content();
 
90
  await browser.close();
91
  res.send(htmlContent);
92
  } catch (error) {
 
71
  }
72
  try {
73
  const browser = await puppeteer.launch({
74
+ headless: false,
75
  args: ['--no-sandbox', '--disable-setuid-sandbox']
76
  });
77
  const page = await browser.newPage();
 
87
  });
88
  await page.goto(url, { waitUntil: 'networkidle2' });
89
  const htmlContent = await page.content();
90
+ await page.waitForTimeout(5000);
91
  await browser.close();
92
  res.send(htmlContent);
93
  } catch (error) {