This is a really simple code snippet that shows how to get the list of CRAN packages and their titles from the html page html page (toulouse mirror in this example).

...

Note that R has the available.packages function, but it does not give the titles of the packages