Citește HTML
Aruncă o privire la următorul fragment dintr-un site web:
Web Scraping is cool
It involves writing code – be it R or Python.
DataCamp has courses on it.
Codul HTML corespunzător îți este furnizat în variabila
html_excerpt_raw.
În acest exercițiu vei folosi rvest pentru a-l încărca în R, astfel încât să poți lucra cu el.
Deoarece vei folosi pachetul rvest pe parcursul întregului curs, acesta va fi întotdeauna preîncărcat pentru tine cu comanda library(rvest).
Acest exercițiu face parte din cursul
Web Scraping în R
Exercițiu interactiv practic
Încearcă acest exercițiu completând acest cod de exemplu.
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