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

281
Visualizações
How to fetch a html page(elements) with JS

I'm trying to fetch a content of a page. When I inspect and go under the 'Elements' section, I can see the needed data in span tag for example, but when I try to fetch which I do as a get request to the url, I receive different HTML that doesn't contain the same data but less.

This is how I try to fetch my data

async function fetchData(url) {
  const response = await axios.get(url);
  console.log(response.data)
}

What would be the reason of the difference and how could I solve it?

Should I use different technique?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Well, indeed, crawlers are supposed to use parsing tools, like Puppeteer library or Cheerio for data-grabbing.

Here are some references:

github puppeteer

npm puppeteer

I've tried to do something like that a few times ago. If you're having troubles - ask for help

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