• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

137
Vistas
Using javascript to read web page after full load

Was trying to read the webpage using javascript & willing to run this from UNIX terminal using below, shell> node test_code.js.

test_code.js

const request = require('request');
request('http://mylocalurl.html', function (error, response, body) {
console.error('error:', error); // Print the error if one occurred
console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
console.log('body:', body); // Print the HTML for the Google homepage.
});

The above code does not wait for the web page to completely load(i.e, full load) & it gives the interim data which is inadequate.

Ask is to, check if we can make the request() function to wait for some time for the webpage to load until it pumps all data & later show all data within the response.

Any help on this would be much appreciated.

Thank you.

almost 3 years ago · Juan Pablo Isaza
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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda