Displaying 1 result from an estimated 1 matches for "disclaimer_action".
2012 Sep 19
1
scraping with session cookies
...t I should do or what I am doing wrong with?
Thank you for your help,
library(RCurl)
library(XML)
site <- "
http://www.wateroffice.ec.gc.ca/graph/graph_e.html?mode=text&stn=05ND012&prm1=3&syr=2012&smo=09&sday=15&eyr=2012&emo=09&eday=18"
postForm(site, disclaimer_action="I Agree")
cf <- "cookies.txt"
no_cookie <- function() {
curlHandle <- getCurlHandle(cookiefile=cf, cookiejar=cf)
getURL(site, curl=curlHandle)
rm(curlHandle)
gc()
}
if ( file.exists(cf) == TRUE ) {
file.create(cf)
no_...