Leer HTML
Echa un vistazo al siguiente extracto de un sitio web:
Web Scraping is cool
It involves writing code – be it R or Python.
DataCamp has courses on it.
El HTML correspondiente se te proporciona en la variable
html_excerpt_raw.
En este ejercicio usarás rvest para leerlo en R y así poder trabajar con él.
Como vas a trabajar con el paquete rvest durante todo el curso, siempre estará precargado para ti con el comando library(rvest).
Este ejercicio forma parte del curso
Web Scraping con R
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
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