Developer console

Before we pull specific elements of a page, we first need to know where to search for them. In order to understand the page structure, we'll use the Chrome Developer console, which is built into the Chrome browser. Firefox has a similar tool – Firefox Developer Tools.

In order to see the HTML structure of any page, simply open it in Chrome, hover over any specific element of the page, right-click on the mouse button, and select Inspect—a new window will appear, showing a page's HTML centered on the element you just hovered over (refer to the following diagram):

Note that when you hover over other elements in this new window, corresponding elements on the page are highlighted. Now, go to the element you're interested in – find it in this new window. Notice the line following the window – it describes the path from the root of the document all the way to the element you see. This path is very important for us—we will use it to pull specific values from the path from Python.

Let's now see how all of this works in practice.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset