Skip to content

Commit

Permalink
feat: Walmart fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iZackk26 committed May 29, 2024
1 parent 112ee6f commit 962c6bb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Api/scrapper/scrapeWalmart.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ const scrapeWalmart = async (url) => {
const price = $('span.vtex-store-components-3-x-currencyContainer').first().text().trim();
const imageUrl = $('img.vtex-store-components-3-x-productImageTag').attr('src');

// Muestra la información extraída
console.log(`Product Name: ${productName}`);
console.log(`Price: ${price}`);
console.log(`Image URL: ${imageUrl}`);
const productData = {
name: productName,
imageUrl: imageUrl,
price: price,
};
return productData;
} catch (error) {
console.error(`Error scraping data: ${error.message}`);
}
Expand Down

0 comments on commit 962c6bb

Please sign in to comment.