arugyani / shopIQ

LLM powered high-consideration research tool for UTD senior project
1 stars 0 forks source link

63 backend clean product information output #67

Closed divyamk closed 2 months ago

divyamk commented 2 months ago

Closes #63

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shop-iq ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2024 4:59am
jitlis commented 2 months ago

on some runs calling the scrapeProducts function hangs and crashes.

    for (var i = 0; i < 10; i++) {
      const prod = await scrapeProduct(productLinks[i]);
      productMotherLoad[prod.title] = prod;
    }
  } else {
    for (var i = 0; i < productLinks.length; i++) {
      const prod = await scrapeProduct(productLinks[i]);
      productMotherLoad[prod.title] = prod;
    }
  }

in this section add a try catches to where the scrapeProduct is being called

divyamk commented 2 months ago

on some runs calling the scrapeProducts function hangs and crashes.

    for (var i = 0; i < 10; i++) {
      const prod = await scrapeProduct(productLinks[i]);
      productMotherLoad[prod.title] = prod;
    }
  } else {
    for (var i = 0; i < productLinks.length; i++) {
      const prod = await scrapeProduct(productLinks[i]);
      productMotherLoad[prod.title] = prod;
    }
  }

in this section add a try catches to where the scrapeProduct is being called

added try catch, also handled if exception was caught