[R] postForm() in RCurl and library RHTMLForms

rahul143 rk204885 at gmail.com
Sun Dec 2 16:51:01 CET 2012


Hi RUsers, 

Suppose I want to see the data on the website 
url <- "http://www.nseindia.com/content/indices/ind_histvalues.htm" 

for the index "S&P CNX NIFTY" for 
dates "FromDate"="01-11-2010","ToDate"="02-11-2010" 

then read the html table from the page using readHTMLtable() 

I am using this code 
webpage <- postForm(url,.params=list( 
                       "FromDate"="01-11-2010", 
                       "ToDate"="02-11-2010", 
                       "IndexType"="S&P CNX NIFTY", 
                       "Indicesdata"="Get Details"), 
                 .opts=list(useragent = getOption("HTTPUserAgent"))) 

But it doesn't give me desired result 

Also I was trying to use the function getHTMLFormDescription from the 
package RHTMLForms but there we can't use the argument 
.opts=list(useragent = getOption("HTTPUserAgent")) which is needed for this 
particular website 


Thanks and Regard



-----
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: http://r.789695.n4.nabble.com/postForm-in-RCurl-and-library-RHTMLForms-tp4651644.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list