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

144
Visualizações
How can I scrape html of any website, find specific values and manipulate, then send back data to client side?

Here is the main idea.

  1. Get Input from the user(client-side) and send it to the server on submit.
  2. In the server, scrape data from any external website (Suppose it will be the whole Html of the target URL).
  3. Manipulate those data to get specific values using the user inputs.
  4. Then send back specific data to the client-side and show it to the user.

I can scrape Html with the following Javascript code.

const request = require('request')
const cheerio = require('cheerio');


let options = {
    url: 'https://targetwebsite.com',
    headers: {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36 Edg/93.0.961.47'
        
    }
};

request(options, function(err, resp, html) {
    if (!err) {
        console.log(html);
    }
})

Now I just needed to know how can I do the whole process.

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