Scrape CRAN Package URLs?

What is the fastest way to obtain all the URLs of packages on CRAN? For example, the URL for the htmlwidgets package is: "https://github.com/ramnathv/htmlwidgets". Is there a more efficient way than just scraping these off each individual package page?

Version: 1.5.1
Imports: grDevices, htmltools (≥ 0.3), jsonlite (≥ 0.9.16), yaml
Suggests: knitr (≥ 1.8)
Enhances: shiny (≥ 1.1)
Published: 2019-10-08
Author: Ramnath Vaidyanathan [aut, cph], Yihui Xie [aut], JJ Allaire [aut], Joe Cheng [aut, cre], Kenton Russell [aut, cph], RStudio [cph]
Maintainer: Joe Cheng
BugReports: https://github.com/ramnathv/htmlwidgets/issues
License: MIT + file LICENSE
URL: https://github.com/ramnathv/htmlwidgets
NeedsCompilation: no
Materials: NEWS
CRAN checks: htmlwidgets results
library(tidyverse)
pdb <- tools:::CRAN_package_db() 

(htmlw <- pdb %>% filter(Package=="htmlwidgets") %>% pull(URL))
#[1] "https://github.com/ramnathv/htmlwidgets"
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.