使用wunderground历史API失败

2024-10-01 04:53:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用wundergroundapi来获得经纬度的历史天气数据。你知道吗

下面是我的python代码:

import requests
import pprint

data = requests.get('http://api.wunderground.com/api/<MY_KEY>/history_199271/q/12.3,-95.9.json').json()
pprint.pprint(data)

答复:

{'response': {'error': {'description': 'No cities match your search query',
                    'type': 'querynotfound'},
          'features': {'history': 1},
          'termsofService': 'http://www.wunderground.com/weather/api/d/terms.html',
          'version': '0.1'}}

你知道怎么了吗?你知道吗

编辑:如果您知道任何其他API或python模块,可以通过地理坐标提供历史天气数据,也可以。你知道吗


Tags: 数据importcomapijsonhttpdata历史