Kursinnhold
Web Scraping with Python
Web Scraping with Python
3. Working with Element Attributes in Beautiful Soup
Challenge: The BeautifulSoup Object
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3
Challenge: The BeautifulSoup Object
Oppgave
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 3