Joyce Robbins
-
@hadleywickham You asked on Twitter last fall for #rvest examples that don't work. This used to pull the latest version of #RStudio but doesn't work anymore (unless I save the page first)
spans <- xml2::read_html("https://posit.co/download/rstudio-desktop/") |>
rvest::html_element(".mt-\\[40px\\].body-md-regular") |>
rvest::html_elements("span") |>
rvest::html_text() |>
stringr::str_extract("Version: .*")rstudio_latest_version <- spans[!is.na(spans)] |>
stringr::str_extract("[0-9.\\+]+")