Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

122
Visualizações
Puppeteer does not evaluate web-app on heroku

I'm using puppeteer on my telegram bot to fetch stuff from the web. Locally, it's all work just fine, but here is the catch:

When trying to fetch the URL's HTML, the given response is not the HTML file, but the web app with all the js files. On my local machine - I'm getting the HTML file with all needed links.

That's my code:

return await puppeteer.launch({
  args: ['--no-sandbox', '--disable-setuid-sandbox'],
  headless: true,
}).then(async browser => {
  const page = await browser.newPage()
  page.setJavaScriptEnabled(true)

  await page.goto(targetUrl)

  await page.waitForTimeout(2000)
  const data = await page.$$eval(SELECTORS, (res) => {
      return res.map(r => {
        return r.getAttribute('ATRR')
      })
    }) as never as string[]

    .......
})

PS -------------- already added this repo to Heroku:

https://github.com/jontewks/puppeteer-heroku-buildpack
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Apparently, when you are using puppeteer-extra, you need to install puppeteer library too.

For some reason, they both depend BUT not auto-installed, so the Chromium engine didn't install on Heroku, and it does explain how it does on my local machine - which has it by default.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda