Challenge: Find All
Task
Swipe to start coding
You will work with the following page.
Your goal is to extract specific HTML elements using BeautifulSoup.
- Use the
.find()
method of thesoup
object to get and print the first<div>
tag from the page. - Use the
.find_all()
method of thesoup
object to get and print all<p>
tags that have an attributeid
equal to"id0"
.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain this in simpler terms?
What are some examples related to this topic?
Where can I learn more about this?
Awesome!
Completion rate improved to 4.35
Challenge: Find All
Swipe to show menu
Task
Swipe to start coding
You will work with the following page.
Your goal is to extract specific HTML elements using BeautifulSoup.
- Use the
.find()
method of thesoup
object to get and print the first<div>
tag from the page. - Use the
.find_all()
method of thesoup
object to get and print all<p>
tags that have an attributeid
equal to"id0"
.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 6
single