diff --git a/NEWS.md b/NEWS.md index 8fb467fd..f5b63fc1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # rvest (development version) +* Use web archive to fix broken example. + # rvest 0.3.4 * Remove unneeded `read_xml.response()` method (#242). diff --git a/R/selectors.R b/R/selectors.R index 4f809175..dee48d51 100644 --- a/R/selectors.R +++ b/R/selectors.R @@ -42,7 +42,11 @@ #' @export #' @examples #' # CSS selectors ---------------------------------------------- -#' ateam <- read_html("http://www.boxofficemojo.com/movies/?id=ateam.htm") +#' url <- paste0( +#' "https://web.archive.org/web/20190202054736/", +#' "https://www.boxofficemojo.com/movies/?id=ateam.htm" +#' ) +#' ateam <- read_html(url) #' html_nodes(ateam, "center") #' html_nodes(ateam, "center font") #' html_nodes(ateam, "center font b") diff --git a/cran-comments.md b/cran-comments.md index a3e268b4..d2acd5f7 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -11,13 +11,4 @@ ## revdepcheck results -We checked 111 reverse dependencies (105 from CRAN + 6 from BioConductor), comparing R CMD check results across CRAN and dev versions of this package. - - * We saw 0 new problems - * We failed to check 1 packages - -Issues with CRAN packages are summarised below. - -### Failed to check - -* petro.One (NA) +This release just fixes an example that was failing on CRAN so I did not run the revdeps. diff --git a/man/html_nodes.Rd b/man/html_nodes.Rd index 98c94b61..589cc3bb 100644 --- a/man/html_nodes.Rd +++ b/man/html_nodes.Rd @@ -58,7 +58,11 @@ simple selector. \examples{ # CSS selectors ---------------------------------------------- -ateam <- read_html("http://www.boxofficemojo.com/movies/?id=ateam.htm") +url <- paste0( + "https://web.archive.org/web/20190202054736/", + "https://www.boxofficemojo.com/movies/?id=ateam.htm" +) +ateam <- read_html(url) html_nodes(ateam, "center") html_nodes(ateam, "center font") html_nodes(ateam, "center font b")