XML : My xpath apply returns NULL value

I am trying to build a web crawler and extract information for the website "http://www.rcsb.org/pdb/home/home.do".

  library(RCurl)  library(XML)    url     <- "http://www.rcsb.org/pdb/home/home.do"  page    <- getURL(url)  parsed  <- htmlTreeParse(page, useInternalNodes = TRUE)    extract <- xpathApply(      parsed,       "//*/href[@id='navbar-collapse-RCSB']/ul/li"  )    

This is the code i have used for going into the "Search" tab in the above website After executing this code I am getting a Null or empty list. How can I extract my data from such websites.

No comments:

Post a Comment