我已经使用这个msn weather api好几年了。
Programatically access weather info
到今天为止,我的应用程序中出现了以下错误。访问被拒绝。这可能是一个小故障,也可能是微软的永久关闭。我不知道,但是有没有其他免费的4天天气预报api可以用来获取XML格式的天气信息?最可悲的是,我已经在至少20个应用程序中使用了这个api,现在我正在争先恐后地寻找解决方案。
几个小时前,我确实给weather@microsoft.com发了一封电子邮件,但正如预期的那样,没有回复。
2014-12-10 07:46:40.321 Big Clock[10890:230027] locationStr: http://weather.service.msn.com/data.aspx?weadegreetype=F&culture=en-US&weasearchstr=Detroit,MI
2014-12-10 07:46:40.461 Big Clock[10890:230027] XML:
<?xml version="1.0" encoding="utf-8"?><weatherdata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><weather errormessage="Access denied: Please contact weather@microsoft.com if you need access to this API." /></weatherdata>发布于 2014-12-10 22:36:03
在这一点上,你并不孤单。就目前而言,传递一个额外的查询字符串"&src=outlook“对我很有效。
工作URL示例:
http://weather.service.msn.com/data.aspx?weasearchstr=45236&culture=en-US&weadegreetype=F&src=outlook
试一试,看看它是否能解决你的问题。
发布于 2014-12-17 05:20:58
我是微软的拉姆。现有的服务将很快被弃用。请再次将您的电子邮件重新发送到别名,以便我们可以将其离线。我们有一个电子邮件问题,所以别名现在应该可以工作了。
请不要使用outlook作为src值。
发布于 2015-03-04 02:57:44
我们在此通知您,Microsoft Weather API将不再提供下载,并将于2015年4月15日停止提供,这意味着它将不再提供天气数据。因此,请从您当前使用的任何产品或应用程序中删除Microsoft Weather API。
如果您有兴趣获得备用天气API,以下是可能能够支持您的需求的外部提供程序列表:
http://api.accuweather.com/
http://www.wunderground.com/weather/api/d/pricing.html?MR=1
https://developer.forecast.io/免责声明: Microsoft和Microsoft Weather与上述任何公司都没有任何关联或关联。
感谢Microsoft天气团队
https://stackoverflow.com/questions/27401831
复制相似问题