0

URLのデータを取得してファイルに保存したい。このコマンドを使用しました

wget -O output_file.txt "http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true"   

そしてそれはうまくいき、データはoutput_file.txtに保存されました。今、私がこのような別のURLを使用したとき:

wget -O output_file.txt "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=YOUR_API_KEY"  

、エラーが表示されます

Resolving maps.googleapis.com (maps.googleapis.com)... 74.125.135.95, 2404:6800:4001:c01::5f 
Connecting to maps.googleapis.com (maps.googleapis.com)|74.125.135.95|:443... failed:
Connection refused. Connecting to maps.googleapis.com (maps.googleapis.com)|2404:6800:4001:c01::5f|:443... failed: Network is unreachable. 

また、データは上記のファイルに保存されません。また、他のURLを試してみましたが、上記のGoogle Places API URLを除いてうまくいきました。ブラウザに入力するだけで、問題のあるURLが正常に機能していることに言及したいと思います。しかし、その方法では、データを表示することしかできません。しかし、そのデータを何らかのファイルに保存したいのです。

すべての問題はLinuxにあります(ubuntu 12.04)

4

0 に答える 0