Web Data Frames
Install the dev version from Github:
## from github
remotes::install_github("mkearney/wibble")
Scrape/wrangle CNN US site
## load pkg
library(wibble)
## scrape CNN
cnn <- webble("https://cnn.com/us")
## wibble and wobble
cnn %>%
wibble() %>%
wobble("body div") %>%
wobble("ul")
#> # A tibble: 37 x 3
#> li a h2
#> <list> <list> <list>
#> 1 <lgl [1]> <lgl [1]> <lgl [1]>
#> 2 <list [4]> <lgl [1]> <lgl [1]>
#> 3 <list [9]> <lgl [1]> <lgl [1]>
#> 4 <list [4]> <lgl [1]> <lgl [1]>
#> 5 <list [6]> <lgl [1]> <lgl [1]>
#> 6 <list [2]> <lgl [1]> <lgl [1]>
#> 7 <list [5]> <lgl [1]> <lgl [1]>
#> 8 <list [5]> <lgl [1]> <lgl [1]>
#> 9 <list [7]> <lgl [1]> <lgl [1]>
#> 10 <list [7]> <lgl [1]> <lgl [1]>
#> # … with 27 more rows