Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
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 answers
Answer question

0

Use headless browser like Puppeteer.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!