Conteúdo do Curso
Web Scraping with Python
Web Scraping with Python
3. Working with Element Attributes in Beautiful Soup
Challenge: Count Number of Images
Tarefa
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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 11
Challenge: Count Number of Images
Tarefa
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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 11