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

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

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 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!