我在 RStudio(运行 R 3.5.2)中编写了一个脚本,用于从特定网站抓取数据。该脚本访问网站,使用 download.file 提取底层代码,并使用标签提取所需的数据。
脚本在 RStudio 中运行没有错误,但是当我尝试在 Azure ML 中的“执行 R 脚本”节点中运行代码时,它会抛出 0063 错误,指出它“无法到达 URL”。该代码一直完美运行,直到它尝试访问该 URL。 (见下面的代码)
我尝试过在 Azure ML 中切换 R 版本 - 这 3 个选项都不起作用。
for(a in 1:length(job_url)) {
download.file(url, destfile = filename, quiet=TRUE)
...
}
我希望脚本在 RStudio 和 Azure ML 中运行相同。有什么想法可以让此脚本在 Azure ML 中运行,就像在 RStudio 中运行一样吗?
最佳答案
For security reasons, all networking from or to R code in Execute R Script modules is blocked by Azure.
关于Azure ML 中的 R 网络抓取错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55941720/