Member-only story

How to Scrape Amazon.com for laptop price and spec via Selenium ?

DigNo Ape
3 min readDec 11, 2020

--

Purpose

We are trying to search and grab the laptop information in the Amazon website by rendering through the browser via Selenium so that we can easily play around with the data. We originally tried to leverage Scrapy but it does not allow us to go this way.

Tool

  • Python package: selenium/ BeautifulSoup/random/ time/ os

Target Website

Steps

  1. Set up the environment. Download the chromedriver driven by selenium to execute the browser rendering.
  2. Go through the structure of the website to locate where the target elements are.
  • When you inspect the website, you can pick price of an example and look it up across the source codes. You will find the information located in the tag of <data-component-type=”s-search-results”>.

--

--

DigNo Ape
DigNo Ape

Written by DigNo Ape

我們秉持著從原人進化的精神,不斷追求智慧的累積和工具的運用來提升生產力。我們相信,每一個成員都擁有無限的潛力,透過學習和實踐,不斷成長和進步。

No responses yet