Course Content
Web Scraping with Python
Attributes & Contents of Multiple Elements
All the methods considered in the previous chapter can be applied to all elements with a particular tag (i.e., to the .find_all()
method result). But remember that the result of applying the .find_all()
method is a list, so you need to use attributes/methods for each element separately. As it was previously done, the for
loop should be used here too. For instance, let's get all the attributes of all <div>
elements.
The same algorithm applies to getting the text. For instance, let's get all the text of all the <p>
elements.
Section 3.
Chapter 3