我尝试访问的网页下载了一个附件,但标头状态始终为 500,我已通过邮递员检查过。
我在用download.file
with wget
R 中的方法下载该文件,但它停止并且不下载,因为标头状态为 500。无论标头状态如何,如何管理下载此文件?
当我在浏览器中访问此链接时,文件下载得很好。
Edit:
以下是我在 R 中使用 download.file 函数的方法:
download.file(get(url), destfile=tmpFile, method = "wget");
我尝试传递额外的参数,例如:
download.file(get(url), destfile=tmpFile, method = "wget", extra =getOption("content-on-error"));
and
download.file(get(url), destfile=tmpFile, method = "wget", extra =getOption("--content-on-error=0"));
但它不起作用
Here :
get(url)
指向链接:(已将实际密钥替换为KEY)
https://app.adroll.com/api/v1/export/all_campaigns_report?advertisable=__KEY__&reports=AllCampaignsSummary,AllCampaignsChart,AllAds,AllCampaignsSites&start_date=01-01-2013&end_date=10-05-2016&format=csv¤cy=USD
尝试连接时的消息:
Resolving app.adroll.com... 52.11.56.178, 52.89.249.63
Connecting to app.adroll.com|52.11.56.178|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2016-10-06 16:22:21 ERROR 500: Internal Server Error.