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

224
Visualizações
How to extract 'div' element from different web page?

I have an allure report webpage that provides a dashboard with a percentage on it. I have to create a completely separate webpage which should show that percentage.
How can I pull that div from that page? Here's the picture of a div

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

0

Fetch it, and then parse it until you have the contents of that div.

For fetch, something simple like (polyfill fetch or use axios instead if using nodejs):

fetch('https://jsonplaceholder.typicode.com').then(function (response) {
    // The API call was successful!
    return response.text();
}).then(function (data) {
    // This is the HTML text from our response
    console.log(data);
}).catch(function (err) {
    // There was an error
    console.warn('Something went wrong.', err);
});

And then for parsing, answers like this will be helpful:

Parse an HTML string with JS

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