[R] Using R htmlParse() for manipulating URLs to access multiple pages

Ilio Fornasero ilioforn@@ero @ending from hotm@il@com
Wed May 23 15:14:37 CEST 2018

I am trying to scrape a manual from web. For privacy reasons, I cannot write here the exact URL, anyway, the structure is as follows:


and so forth. Of course, I don't want to scrape the single URLs one by one. Hence, I am considering the base URL for parsing and to start from there onward.

baseurl <- htmlParse( "https://home.lala.com/bibi/blabla/",
                  encoding = "UTF-8")
xpath <- "//div[@id='Page']/strong[2]"
GetAllPages <- as.numeric(xpathSApply(baseurl, xpath, xmlValue))

Nevertheless, it does not work at all:

> GetAllPages

Any hint?

	[[alternative HTML version deleted]]

More information about the R-help mailing list