0
我試圖對很多數據進行地理編碼。我有很多機器來傳播負載(這樣我就不會每天按IP地址發送2,500個請求)。我正在使用腳本通過wget或cURL發出請求。但是,wget和cURL都會產生相同的「請求被拒絕」消息。這就是說,當我從瀏覽器發出請求時,它完美地工作。一個例子要求是:發送請求到谷歌的地理編碼API從終端
wget http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true
並輸出結果是:
[1] 93930
05:00 PM ~: --2011-12-19 17:00:25-- http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA
Resolving maps.googleapis.com... 72.14.204.95
Connecting to maps.googleapis.com|72.14.204.95|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: `json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA'
[ <=> ] 54 --.-K/s in 0s
2011-12-19 17:00:25 (1.32 MB/s) - `json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA' saved [54]
它寫信給該文件只包含:
{
"results" : [],
"status" : "REQUEST_DENIED"
}
任何幫助深表感謝。
不,我不是,你需要滾動它,我寫了什麼。它說'&傳感器=真實' – Mason 2011-12-22 19:39:26
我已經更新了答案,以更好地反映您遇到的問題。 &字符是特殊的bash。 – bamnet 2011-12-23 06:33:33