In this article we will go through a web scraping process of an E-Commerce website. I have designed this particular post to be beginner friendly. So, if you have no prior knowledge about web scraping or Selenium you can still follow along.
To understand web scraping, we need to understand HTML code basics. We will cover that as well.
Basics of HTML
There are a lot of things to talk about concerning HTML basics but we will focus on the things that will be helpful (at least most of the times) in web scraping.
Image for post
Image for post
Fig 1, LEFT: A simple HTML Code, RIGHT: HTML element, Source: Author
HTML element (Fig 1 RIGHT) — an HTML element is the collection of start tag, its attributes, an end tag and everything in between.
Attributes — are special words used inside a start tag to control the element’s behavior. Attribute and its value are together used in referencing a tag and its content for styling. The most important attributes we will use in web scraping includes class, id and name.
class and id attributes — HTML elements can have one or more classes, separated by spaces (see Fig 1 LEFT above). On the other hand, HTML elements must have unique id attributes, that is, an id cannot be used to reference more than one HTML element.

#data-science #web-scraping #selenium #data #python #data analytic

Web Scraping E-Commerce Website Using Selenium
3.10 GEEK