RstudioServer无法下载URL

时间:2018-06-21 19:07:42

标签: url web-scraping rstudio rstudio-server

我试图使用Rstudio Server从此站点下载csv:

https://www.federalregister.gov/documents/search.csv?conditions%5Bpublication_date%5D%5Bgte%5D=03%2F01%2F2018&conditions%5Bpublication_date%5D%5Blte%5D=03%2F31%2F2018&conditions%5Bsections%5D=business-and-industry&conditions%5Btype%5D%5B%5D=PRORULE

我尝试过:

this_rule_url = "https://www.federalregister.gov/documents/search.csv?conditions%5Bpublication_date%5D%5Bgte%5D=03%2F01%2F2018&conditions%5Bpublication_date%5D%5Blte%5D=03%2F31%2F2018&conditions%5Bsections%5D=business-and-industry&conditions%5Btype%5D%5B%5D=PRORULE"
fread(this_rule_url)
read.csv(curl(this_rule_url))
read.csv(this_rule_url)
rio::import(this_rule_url)
readr::read_csv(this_rule_url)

但是我总是遇到相同的错误:

Connection timed out

Error in curl::curl_download(input, tt, mode = "wb", quiet = !showProgress) : 
  Timeout was reached: Connection timed out after 10001 milliseconds

相同的代码在RStudio中有效,但在Rstudio Server上无效。

0 个答案:

没有答案