Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

171
Visualizações
Writing a Web Scraper in Node.js - First Attempt

I am trying to take a crack at writing my first web scraper tool in Node.js since Python always gives me trouble on my Windows 11 machine. Yet, on Kali Linux 2021.3, it works flawlessly. I even have Python in my C:\ProgramFiles\Python310\python.exe, but it seems pip is still in app data. It's frustrating.

Anyway, I am trying to use the Cheerio node.js module. Still, I wanted to make sure I was even doing this correctly. I want to try and give trends.vc a try, or maybe Google search results if that page is too limited. I used ZAP in Kali to get all the URLs on trends.vc, but I am unsure if I can use them all together in one function or not.

I am experimenting with web scrapers, seeing if I can collect a list of emails from join.trends.vc or just the Google Search result method.

Below is my code for the javascript after creating a package.json and using npm test as my test command, which yields nothing as I am sure I messed this up a while ago. I also tried implementing request-promise and html-email-scraper, and others, but I know I am writing this wrong. If anyone can point me in the right direction, that would be well appreciated.

At this point in time, I am just attempting to scrape the emails from this one page and convert it into a CSV. I followed some tutorials and managed to get those working, but not for the pages I am trying to scrape.

const request = require("request-promise")
const cheerio = require("cheerio");
const fs = require('fs');
const writeStream = fs.createWriteStream('post.csv');

request("https://join.trends.vc/", (error, response, html) => {
  if (!error && response.statusCode == 200) {
    const $ = cheerio.load(html);

    const datarow = $(".form01");
    const output = datarow.find("div").text();
    $(".field").each((i, data) => {
      const item = $(data).text();
      const item1 = $(data).text();

      // Write Row To CSV
      writeStream.write(`${title}, ${link}, ${date} \n`);
    });
    // console.log(item);
    console.log(item, item1);
  }
});

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda