home.social
  1. @hadleywickham You asked on Twitter last fall for examples that don't work. This used to pull the latest version of but doesn't work anymore (unless I save the page first)

    spans <- xml2::read_html("posit.co/download/rstudio-desk") |>
    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.\\+]+")