Parsing the DOM to extract pricing data
The DOM is the collection of elements that form the structure a web page. If you have ever viewed the source of a web page, you have seen the components of the DOM. They include elements and tags such as
id. We'll need to work with these elements to extract the data we need.
Let's take a look at the DOM for our Google page. To see it, right-click on the page and click on Inspect element. This should be the same for Firefox or Chrome. This will open the developer tab that allows you to see the page source information. Once this is open, choose the element selector in the upper left corner, and click on one of the price bars to jump to that element.