Kursusindhold
Web Scraping with Python
Web Scraping with Python
3. Working with Element Attributes in Beautiful Soup
Challenge: The BeautifulSoup Object
Opgave
Swipe to start coding
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 thesoup
variable and print its content.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 3
Challenge: The BeautifulSoup Object
Opgave
Swipe to start coding
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 thesoup
variable and print its content.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 3