문서가 "비"라고했기 때문에 나는 Open Weather Map을 피곤하지만, 내가 전화 할 때는 그렇지 않습니다. 그래서 Python Weather API을 시도했지만 weather.com, noaa 또는 yahoo 날씨의 옵션 중 어느 것도 강우 또는 강수량이 없습니다. 그래서 Wunderground을 시도했지만 미국 도시에서만 작동하는 것으로 보입니다. 그리고 그 위에 나는 열쇠를 사느라 귀찮게 할 수 없습니다.날씨 api를 통해 강수량/강우량을 얻는 방법?
누구나 여기에서 어디로 가야할지 알고 계십니까? 개방 날씨지도에서
는 그것이 비를 가지고 말한다, 그러나 나는 결과에 그것을 얻을하지 않습니다 내가 그렇게
처럼 호출 할 때,{"coord":{"lon":139,"lat":35},
"sys":{"country":"JP","sunrise":1369769524,"sunset":1369821049},
"weather":[{"id":804,"main":"clouds","description":"overcast clouds","icon":"04n"}],
"main":{"temp":289.5,"humidity":89,"pressure":1013,"temp_min":287.04,"temp_max":292.04},
"wind":{"speed":7.31,"deg":187.002},
"rain":{"3h":0}, # on this line
"clouds":{"all":92},
"dt":1369824698,
"id":1851632,
"name":"Shuzenji",
"cod":200}
그러나
예 JSON 호출
from pprint import pprint
import requests
r = requests.get('http://api.openweathermap.org/data/2.5/weather?q=Vancouver')
pprint(r.json())
강우/강수량이없는 무언가가 나타납니다.
{u'base': u'cmc stations',
u'clouds': {u'all': 0},
u'cod': 200,
u'coord': {u'lat': 49.25, u'lon': -123.12},
u'dt': 1406042326,
u'id': 6173331,
u'main': {u'humidity': 77,
u'pressure': 862,
u'temp': 289.33,
u'temp_max': 290.93,
u'temp_min': 288.15},
u'name': u'Vancouver',
u'sys': {u'country': u'CA',
u'message': 0.1867,
u'sunrise': 1406032353,
u'sunset': 1406088323},
u'weather': [{u'description': u'Sky is Clear',
u'icon': u'01d',
u'id': 800,
u'main': u'Clear'}],
u'wind': {u'deg': 104.001, u'speed': 2.75}}
잘 모르겠습니다. 그것은 내가 시험해 보았던 곳에서 미친 듯이 비가 내리기 시작했습니다. 그리고 여전히 비가 내리는 열쇠가 없습니다. –
보통 강수량은 몇 시간 동안 강수량을 누적 한 후에보고됩니다. OpenWeatherMap에서 이것은 3 시간입니다. – Amitabh