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

110
Vistas
Stealing text from a website using node.js

My main goal:

I want to create a web-app that allows the user to input a url, and my program will 'go' to that website and essentially ctrl + a, ctrl + c, and paste store it as an array of strings. (Basically I want to obtain only the text that you could get using ctrl+a) I want to use Node.js to do this as I know it can make connections with websites. I have been searching the web for a while and haven't found anything of use.

Is there a way to do this?

My project: I am creating a speed reading app but I want to go beyond the user simply copying and pasting into a text box. That is why I want to be able to take the text from basically any website. I am using WebStorm to work on my project.

I have tried what was suggested on: https://www.codegrepper.com/code-examples/javascript/extract+all+text+from+website+node+js

//eventhough deprecated, still able to use
const request = require('request');
request('http://www.google.com', 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.
});

But this does not get me what I want. This simply pulls all the stuff from the body of the HTML.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use headless browser like Puppeteer.

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