Course Content
Web Scraping with Python
Web Scraping with Python
Challenge: The BeautifulSoup Object
Swipe to show code editor
Print the first h1
of the page tag using BeautifulSoup
:
- Import the
BeautifulSoup
frombs4
. - Create the
BeautifulSoup
object and assign it to the variablesoup
. - Access the first
<h1>
tag using the soup variable and print its content.
Thanks for your feedback!
Challenge: The BeautifulSoup Object
Swipe to show code editor
Print the first h1
of the page tag using BeautifulSoup
:
- Import the
BeautifulSoup
frombs4
. - Create the
BeautifulSoup
object and assign it to the variablesoup
. - Access the first
<h1>
tag using the soup variable and print its content.
Thanks for your feedback!
Challenge: The BeautifulSoup Object
Swipe to show code editor
Print the first h1
of the page tag using BeautifulSoup
:
- Import the
BeautifulSoup
frombs4
. - Create the
BeautifulSoup
object and assign it to the variablesoup
. - Access the first
<h1>
tag using the soup variable and print its content.
Thanks for your feedback!
Swipe to show code editor
Print the first h1
of the page tag using BeautifulSoup
:
- Import the
BeautifulSoup
frombs4
. - Create the
BeautifulSoup
object and assign it to the variablesoup
. - Access the first
<h1>
tag using the soup variable and print its content.