简体   繁体   English

R Web刮除Azure ML错误

[英]R web scraping in Azure ML errors out

I have written a script in RStudio (running R 3.5.2) that scrapes data from a particular website. 我已经在RStudio(运行R 3.5.2)中编写了一个脚本,用于从特定网站抓取数据。 The script reaches out to a website, uses download.file to pull the underlying code, and uses tags to extract the desired data. 该脚本可以访问网站,使用download.file提取底层代码,并使用标签提取所需的数据。

The script runs without error in RStudio, but when I try to run the code in the "Execute R Script" node in Azure ML it throws a 0063 error saying that it "cannot reach URL ". 该脚本在RStudio中运行时没有错误,但是当我尝试在Azure ML的“ Execute R Script”节点中运行代码时,它将抛出0063错误,表明其“无法到达URL”。 The code runs perfectly up until it tries to reach out to the URL. 该代码可以完美运行,直到尝试访问该URL。 (see code below) (请参见下面的代码)

I have tried switching the R version in Azure ML--neither of the 3 options work. 我曾尝试在Azure ML中切换R版本-这三个选项都不起作用。

for(a in 1:length(job_url)) {
     download.file(url, destfile = filename, quiet=TRUE)
      ...
}

I expect the script to run the same in RStudio and Azure ML. 我希望脚本在RStudio和Azure ML中运行相同。 Any ideas how to get this script to run in Azure ML the same way it runs in RStudio? 有什么想法如何使该脚本在RML中以相同的方式在Azure ML中运行?

For security reasons, all networking from or to R code in Execute R Script modules is blocked by Azure. 出于安全原因,Azure禁止在Execute R Script模块中从R代码到R代码的所有联网。

https://docs.microsoft.com/en-us/azure/machine-learning/studio-module-reference/execute-r-script#networking https://docs.microsoft.com/zh-cn/azure/machine-learning/studio-module-reference/execute-r-script#networking

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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