This is the simplest solution using the puppeteer lib for scraping data from Amazon.com When we run the script, we look for html elements with laptop data, in the next step, we look for the name and price for each element (check the discount price additionally), collect this data into an array and display it in the console.
To install dependencies
npm i
To scrape a laptops data:
npm run scraper