Get data from a lego set page

lego_get_set_data(url)

Arguments

url

page url

Examples

library(LegoR) sets <- lego_get_sets("https://shop.lego.com/en-US/category/creator-3-in-1")
#> Warning: 1 parsing failure. #> row col expected actual #> 6 -- a number .
lego_get_set_data(sets$set_link[1]) # get one set
#> # A tibble: 1 x 9 #> set_Item set_VIP.Points set_Ages set_Pieces set_minifigs set_availability #> <chr> <chr> <chr> <chr> <dbl> <chr> #> 1 31097 520 9+ 969 3 Available now #> # … with 3 more variables: set_review_count <dbl>, set_rating_value <dbl>, #> # set_best_rating <dbl>
sets <- sets %>% dplyr::mutate(set_info = purrr::map(set_link, lego_get_set_data)) %>% tidyr::unnest(set_info)