[R] RCurl cookiejar

Earl Brown ekbrown at k-state.edu
Sun Aug 25 08:01:21 CEST 2013


R-helpers,

When I use cURL in the Terminal:

curl --cookie-jar cookie.txt --url "http://corpusdelespanol.org/x.asp" --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20100101 Firefox/23.0" --location --include

a cookie file "cookie.txt" is saved to my working directory. However, when I try what I think is the equivalent command R with RCurl:

ch <- getCurlHandle(followlocation = T, header = T, useragent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20100101 Firefox/23.0")
getURL(url = "http://www.corpusdelespanol.org/x.asp", cookiejar = "cookie.txt", curl = ch)

no cookie file is saved. 

What am I missing to reproduce in RCurl what I'm successfully doing in the Terminal?

Thank you for your time and help. Earl Brown

-----
Earl K. Brown, PhD
Assistant Professor of Spanish Linguistics
Advisor, TEFL MA Program
Department of Modern Languages
Kansas State University



More information about the R-help mailing list