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

114
Vistas
Loop over URLs and extract values and store in JSON JavaScript

I have a list of URLs I want to loop over and get the prices. I was doing it with Python but the website is blocking the script. I tried it with Chrome Dev. Tools and it was working fine. I do not have any experience with JavaScript to do it. I have a simple code where I want to loop over the URLs, extract the prices and store into a JSON file on my local PC like this. Prices

{
'link': link,
'prices' span[class="price"],
'sku': td[data-th="SKU"]
}

Code:

const urls = [
    'https://www.fahorro.com/3-a-ofteno-1-mg-oft-5-ml-gotas.html',
    'https://www.fahorro.com/zamoprax-0-25-mg-c2-con-30-tabletas.html'
];

urls.forEach(function(url) {
    fetch(url).then(response => response.text())
    .then(data => console.log(data));;
});
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

When it comes to parsing queries, I rely on the qs library (https://www.npmjs.com/package/qs). Can you please take a look at the package and see if can help you.

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