Displaying 20 results from an estimated 20 matches for "getcurlhandle".
2013 May 08
1
Dependencies of Imports not attached?
Encountered an error in scripting, which can be reproduced using Rscript as
follows:
$ Rscript -e "library(httr); handle('http://cran.r-project.org')"
Error in getCurlHandle(cookiefile = cookie_path, .defaults = list()) :
could not find function "getClass"
Calls: handle -> getCurlHandle
or by starting R without the methods package attached:
$ R_DEFAULT_PACKAGES=base R
[snip]
> library(httr)
> handle('http://cran.fhcrc.org/')
Error in getC...
2010 Nov 14
1
RCurl and cookies in POST requests
Hello.
I know that it's usually possible to write cookies to a cookie
file by removing the curl handle and doing a gc() call. I can do
this with getURL(), but I just can't obtain the same results with
postForm().
If I use:
curlHandle <- getCurlHandle(cookiefile=FILE, cookiejar=FILE)
and then do:
getURL(http://example.com/script.cgi, curl=curlHandle)
rm(curlHandle)
gc()
it's OK, the cookie is there. But, if I do (same handle; the
parameter is a dummy):
postForm(site, .params=list(par="cookie"), curl=curlHandle,
style="PO...
2012 Dec 05
1
request
...g the protocols as shown in Input (below), i have go the
output as shown in below.
input
library (rneos)
NC<-CreateNeosComm(curlopts=list(httpheader=c('content-type'="text/xml",
'User-Agent'="R"), protocols=proxy.noc.titech.ac.jp:3128,
port=3332),curlhandle=getCurlHandle())
#to check the neos server is active"NeosServer is alive" is returned
Nping(convert=T, nc=NC)
output
> library (rneos)
> NC<-CreateNeosComm(curlopts=list(httpheader=c('content-type'="text/xml",
'User-Agent'="R"), protocols=proxy.noc.titech.a...
2012 Sep 19
1
scraping with session cookies
....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
[[alternative HTML version deleted]]
2013 Aug 25
2
RCurl cookiejar
....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...
2011 Jan 06
0
Problem with package twitteR and converting S4 obj to data frame
...have equal lengths
I have no clue why works fine with n=10 but for higher values fall over. Any
Suggestions?
Below is my script.
Thanks,
Alberto
library(plyr)
library(twitteR)
getuser <- getUser('altons')
count <- 50
UserFollowers <-userFollowers(getuser, n=count, session = getCurlHandle())
dffollow <- ldply(userFollowers(getuser, n=count, session =
getCurlHandle()),
function(x) c(screenName=x at screenName
,name=x at name
,statusesCount =x at statusesCount
,followersCount=x at followersCount
,friendsCount=x at friendsCount
,TwitterBirth=...
2012 Jun 07
1
How to set cookies in RCurl
...able session cookies in
your browser and try again.
$`NULL`
V1 V2 V3
1
$`NULL`
V1
1 Cookies disabled
$`NULL`
V1
1
2
3
I have carefully read section 4.4. from this:
http://www.omegahat.org/RCurl/RCurlJSS.pdf and tried the following without
succes:
curl <- getCurlHandle()
curlSetOpt(cookiejar = 'cookies.txt', curl = curl)
Any suggestions on how to allow for cookies?
Thanks.
Math
--
View this message in context: http://r.789695.n4.nabble.com/How-to-set-cookies-in-RCurl-tp4632693.html
Sent from the R help mailing list archive at Nabble.com.
2010 Sep 16
2
FTP Download
...split(filenames, "\r*\n")[[1]], sep = "")
no problems until here, I get a list with the files I want. But then, when I
use:
download.file(filenames, destfile="") I don't know how to tell R to use the
same names for the destfiles als the filenames.
If i use:
con = getCurlHandle( ftp.use.epsv = FALSE)
contents = sapply(filenames[1:5], getURL, curl = con)
names(contents) = filenames[1:length(contents)]
I get an "error in curlPerform".
I know, it's easy to download ftp folders with appropriate programs, but i
want to manage to get it work in R....
greets
Mar...
2010 Nov 22
1
RCurl : All connection are used ?
... ftpUpload(what=files[i],to=files[i])
}
At i=11 I get : (my server has only 10 available open connections available) :
Erreur dans curlPerform(url = to, upload = TRUE, readfunction = uploadFunctionHandler(what, :
Got a 421 ftp-server response when 220 was expected
2 nd Try :
ftpConnection=getCurlHandle(userpwd=ftp$userpwd,maxconnects=1,fresh.connect=0)
for (i in 1:length(file)){
ftpUpload(what=files[i],to=files[i],curl=ftpConnection)
}
And I got this error after 30 files (the error is not linked to the web server but to the R session) :
Error in file(file, "rb") : all conection ar...
2008 Aug 27
1
RCurl: using netrc with curlPerform
....opts, curl handle and the ... argument) but got the same error
message each time.
# Failed attempt using .opts construct
myopts <-curlOptions(netrc=1)
curlPerform("http://www.omegahat.org/RCurl/testPassword/index.html",
.opts=myopts)
# Failed attempt using curl handle
handle <- getCurlHandle(netrc=1)
curlPerform("http://www.omegahat.org/RCurl/testPassword/index.html",
curl=handle)
# Failed attempt using ... construct
curlPerform("http://www.omegahat.org/RCurl/testPassword/index.html",
netrc=1)
Common error message for all failed attempts:
Error in mapCurlOptName...
2013 Apr 24
0
string size limits in RCurl
...cter size limit in a JSON string when trying retrieve data from either `curlPerform()` or `getURL()`. Here is non-reproducible code [1], but it should shed some light on the problem.
# Note that .base.url is the basic url for the API, q is a query, user
# is specified, etc.
session = getCurlHandle()
curl.opts <- list(userpwd = paste(user, ":", key, sep = ""),
httpheader = "Content-Type: application/json")
request <- paste(.base.url, q, sep = "")
txt <- getURL(url = request, curl = session, .opts = curl.opts,...
2011 Sep 28
1
Password protected R Repository
Hi,
I've set up a very simple R repository. Just a single source
library. Everything works fine. I can install the package on my client
using:
install.packages(repos='http://www.myServer.se/myRepo/',
pkgs='myLib', dep=TRUE)
However, I want to protect the repo, so I use a
.htaccess, placed directly under 'myRepo' on the server. I use
'Authentication Basic' and
2009 Feb 26
2
ftp fetch using RCurl?
Hi everyone,
I have to fetch about 300 to 500 zipped archives from a remote ftp server.
Each of the archive is about 1Mb. I know I can get it done by using
download.file() in R, but I am curious that is there a faster way to do this
using RCurl. For example, are there some parameters that I can set so that
the connection does not need to be rebuilt....etc.
A even simpler question is, how can I
2009 Sep 17
1
RCurl and Google Scholar's EndNote references
Hi!
I've performed a Google Scholar Search using a query, let's say "Frank
Harrell", and parsed the links to the EndNote references from the resulting
HTML code. Now I'd like to download all the references automatically. For
this, I have tried to use RCurl, but I can't seem to get it working: I
always get error code "403 Forbidden" from the web server.
2012 Jun 11
0
SSOAP Parameter Structures: Nested Arrays
...get a response is:
library(SSOAP)
library(XML)
library(RCurl)
# download the file needed for authentication
download.file(url="http://curl.haxx.se/ca/cacert.pem",
destfile="cacert.pem")
# set the curl options
curl <- getCurlHandle()
options(RCurlOptions = list(capath = system.file("CurlSSL",
"cacert.pem",
package = "RCurl"),
ssl.verifypeer = FALSE))
curlSetOpt(.opts = list(proxy = 'proxyserver:port'), curl = curl)
wsdl <- getURL("XXXXXX.as...
2016 Jan 27
2
rstan warning messages
Confirmed that gcc-gfortran is installed
Package gcc-gfortran-4.4.7-16.el6.x86_64 already installed and latest version
What could I check next?
I do not have the following installed and will get that done and tested again.
libcurl-devel
libidn-devel
Thanks,
Larry
-----Original Message-----
From: Tom Callaway [mailto:tcallawa at redhat.com]
Sent: Wednesday, January 27, 2016
2016 Jan 28
2
rstan warning messages
...er.Rd:15: missing file link 'writeBin'
chunkToLineReader html
...
getCurlErrorClassNames html
Rd warning: /tmp/RtmpaLgRR9/R.INSTALL33a830da853e/RCurl/man/getCurlErrorClassNames.Rd:25: missing file link 'tryCatch'
getCurlHandle html
...
url.exists html
Rd warning: /tmp/RtmpaLgRR9/R.INSTALL33a830da853e/RCurl/man/url.exists.Rd:5: missing file link 'file.exists'
** building package indices
...
Error in dyn.load(file, DLLpath = DLLpath...
2008 May 07
1
[BioC] RCurl loading problem with 64 bit linux distribution
...tion \examples
> > fileUpload text html latex
> > findHTTPHeaderEncoding text html latex example
> > getBitIndicators text html latex example
> > Note: removing empty section \examples
> > getCurlHandle text html latex
> > getCurlInfo text html latex example
> > getURIAsynchronous text html latex example
> > Note: removing empty section \details
> > getURL text...
2008 May 07
1
[BioC] RCurl loading problem with 64 bit linux distribution
...tion \examples
> > fileUpload text html latex
> > findHTTPHeaderEncoding text html latex example
> > getBitIndicators text html latex example
> > Note: removing empty section \examples
> > getCurlHandle text html latex
> > getCurlInfo text html latex example
> > getURIAsynchronous text html latex example
> > Note: removing empty section \details
> > getURL text...
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...B ftpUpload(what=files[i],to=files[i])
}
At i=11 I get : (my server has only 10 available open connections available)
:
Erreur dans curlPerform(url = to, upload = TRUE, readfunction =
uploadFunctionHandler(what,B :
B Got a 421 ftp-server response when 220 was expected
2 nd Try :
ftpConnection=getCurlHandle(userpwd=ftp$userpwd,maxconnects=1,fresh.connect=
0)
for (i in 1:length(file)){
B B B B B ftpUpload(what=files[i],to=files[i],curl=ftpConnection)
}
And I got this error after 30 files (the error is not linked to the web
server but to the R session) :
Error in file(file, "rb") : all conect...