search for: no_cooki

Displaying 2 results from an estimated 2 matches for "no_cooki".

Did you mean: no_cookie
2010 Nov 14
1
RCurl and cookies in POST requests
...is a file (cookies.txt) with two cookies. The script currently uses getURL() and two cookies are stored. If postForm() is used (currently commented), only 1 cookie is written. -- SDF Public Access UNIX System - http://sdf.lonestar.org -------------- next part -------------- # The script will call no_cookie() if no cookies file exists. # It will then read the cookie XXX (its value is "cookie1"). # When XXX has been read, it will be written to "c_file" with # "rm(curlHandle) ; gc()". Finally the script will test whether # cookie ZZZ (its value is "cookie2") exis...
2012 Sep 19
1
scraping with session cookies
...rary(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_cookie() } allTables <- readHTMLTable(site) allTables [[alte...