You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -85,9 +85,8 @@ Once you know exactly what you want from the site, you can inspect those element
85
85
86
86
The Chrome DevTools will open and display the HTML structure of the page. You can manually search for the item you need or use the element picker tool in the top-left corner. Select it, hover over the item you need in the page and it'll find it in the HTML code. After a quick inspection, you can see that the main information on each book is located in the article element with a class name**product_pod**.
87
87
88
-
<palign="center">
89
-
<img src="https://i.imgur.com/QbdDzyW.png" alt="books.toscrape.com Inspecting the HTML">
All of the data you'll need is nested in the**article** element. Now, let's inspect the price. We can see that the price value is the text of the paragraph with the**price_color** class. If you inspect the In stock part, you can see that it's a text value of the**instock availability** paragraph. You can check out other elements on the page and see how they're represented in the HTML. Once you're done, let's build a simple web scraper to extract this data through code.