Course Content
Web Scraping with Python
Web Scraping with Python
Challenge: Count Number of Images
Now that you've opened and read the page, let's attempt to extract some information from it!
Task
Swipe to show code editor
The page you accessed in the previous challenge has already been loaded, read, and decoded. Your tasks are as follows:
- Count the number of
div
tags within theweb_page
. - Count the number of images (
img
) within theweb_page
.
Since elements may have certain attributes, use the '<div'
and '<img'
as elements to look for.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 11
Challenge: Count Number of Images
Now that you've opened and read the page, let's attempt to extract some information from it!
Task
Swipe to show code editor
The page you accessed in the previous challenge has already been loaded, read, and decoded. Your tasks are as follows:
- Count the number of
div
tags within theweb_page
. - Count the number of images (
img
) within theweb_page
.
Since elements may have certain attributes, use the '<div'
and '<img'
as elements to look for.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 11
Switch to desktop for real-world practiceContinue from where you are using one of the options below