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

183
Views
How to read online file line by line?

I'm sorry for this very basic question, but I can't find it out. Basically I'm trying to read this file line-by-line, then in another HTML page whenever there is a string that match one of these lines, then it will be wrapped within the <span class="hello">...</span> tag. For the latter I can use the findAndReplaceDOMText library, and I thought that the former should be easy too. But I can only find answers to read an uploaded file. That is, using

<input type="file" name="file" id="file">

to upload it. For example: How to use Javascript to read local text file and read line by line?, Reading line-by-line file in JavaScript on client side. Googling js read line by line only returns results for Node.js

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the Fetch API and read the response as text and iterate line by line

(async () => {
  const response = await fetch("https://xn--qucu-hr5aza.cc/files/M%E1%BB%99t%20h%E1%BB%87%20th%E1%BB%91ng%20ni%E1%BB%81m%20tin/Node%20list");
  const data = await response.text();
  const lines = data.split("\n");
  console.log(lines)
})();
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!