From a9d15b95e709c05fa3d401f5b8d6215c436b63d5 Mon Sep 17 00:00:00 2001 From: 401118 <401118@hdi.de> Date: Mon, 15 Jul 2024 17:58:32 +0200 Subject: [PATCH] fixing example in tidy scrap --- R/tidy_scrap.R | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/R/tidy_scrap.R b/R/tidy_scrap.R index 85f5b8d..3ebaee8 100644 --- a/R/tidy_scrap.R +++ b/R/tidy_scrap.R @@ -12,12 +12,11 @@ #' @return a tidy data frame. #' @examples \donttest{ #' # Extracting imdb movie titles and rating -#' -#' link <- "https://www.imdb.com/chart/top/" -#' my_nodes <- c(".titleColumn a", "strong") -#' names <- c("title", "rating") -#' -#' tidy_scrap(link, my_nodes, names)} +#'link <- "https://www.imdb.com/chart/top/" +#'my_nodes <- c("a > h3.ipc-title__text", "span.ratingGroup--imdb-rating") +#'names <- c("title", "rating") +#'tidy_scrap(link, my_nodes, names) +#' } #' #' @export #' @importFrom rvest html_nodes html_text %>%