简体   繁体   中英

Increase maximum redirects allowed in RCurl

I am trying to write a script that takes a list of URLs and returns a vector specifying whether each website is up or not (TRUE or FALSE).

The problem is that the url.exists() function from the RCurl package returns an error (ie FALSE) for redirect status codes in the 300 range, which are not really errors (at least the sort I am concerned with). This problem was identified in another question .

To address this problem, I am using the url_success function from the httr package.

However, this produces another error when I run it on certain websites, for example:

> url_success(site_list[621])

Error in function (type, msg, asError = TRUE) :

Maximum (10) redirects followed

Is there a way to change the maximum redirects allowed by RCurl?

Or is there an alternative way to approach my problem in general here?

RCurl中 ,尝试如下操作:

url.exists(url, maxredirs=-1)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM