Course Content
Web Scraping with Python
Web Scraping with Python
3. Working with Element Attributes in Beautiful Soup
Challenge: Count Number of Images
Task
Swipe to start coding
You have successfully opened, read, and decoded the page. Your tasks are:
- Count the number of
div
tags within theweb_page
. - Count the number of images (
img
) within theweb_page
.
To identify these elements, search for the strings "<div"
and "<img"
, as elements may include attributes.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 11
Challenge: Count Number of Images
Task
Swipe to start coding
You have successfully opened, read, and decoded the page. Your tasks are:
- Count the number of
div
tags within theweb_page
. - Count the number of images (
img
) within theweb_page
.
To identify these elements, search for the strings "<div"
and "<img"
, as elements may include attributes.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 11