Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

219
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda