【发布时间】:2016-01-11 11:32:29
【问题描述】:
我正在尝试从 ESA 访问 API。详情here 使用 curl 时,
curl -svgu <user>:<password> "https://scihub.esa.int/dhus/odata/v1/Products?$filter=year(IngestionDate) eq 2015 and month(IngestionDate) eq 10 and day(IngestionDate) eq 10"
回复者的日期错误(2014 年)
在 chrome 上使用相同的链接会产生预期的结果(日期已过的文件)
https://scihub.esa.int/dhus/odata/v1/Products?$filter=year(IngestionDate) eq 2015 and month(IngestionDate) eq 10 and day(IngestionDate) eq 10
我尝试删除空格并使用
`"https://scihub.esa.int/dhus/odata/v1/Products?$filter=year(IngestionDate)%20eq%202015%20and%20month(IngestionDate)%20eq%2010%20and%20day(IngestionDate)%20eq%2010"`
卷曲。
有什么建议或想法吗?您可以使用这些链接进行尝试。
编辑: 根据Pafjo的建议, curl -G -gu : "https://scihub.esa.int/dhus/odata/v1/Products" --data-urlencode '$filter=year(IngestionDate) eq '"$YEAR and month(IngestionDate) eq $MONTH and day(IngestionDate) eq $DAY" 这就是答案
【问题讨论】: