Leggere HTML
Dai un'occhiata al seguente estratto da un sito web:
Web Scraping is cool
It involves writing code – be it R or Python.
DataCamp has courses on it.
L'HTML corrispondente ti è fornito nella variabile
html_excerpt_raw.
In questo esercizio userai rvest per leggerlo in R, così potrai lavorarci.
Dato che in tutto il corso userai il pacchetto rvest, sarà sempre stato caricato in anticipo per te con il comando library(rvest).
Questo esercizio fa parte del corso
Web scraping in R
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
html_excerpt_raw <- '
Web scraping is cool
It involves writing code – be it R or Python.
DataCamp
has courses on it.
'
# Turn the raw excerpt into an HTML document R understands
html_excerpt <- ___
html_excerpt