天气预报API接口
原文:天气预报API接口
一、中央气象台API接口:
1. XML接口
http://flash.weather.com.cn/wmaps/xml/china.xml
这个是全国天气的根节点,列出所有的省,其中的pyName字段是各个省XML的文件名,比如北京的是beijing,那就意味着北京的XML地址为
http://flash.weather.com.cn/wmaps/xml/beijing.xml
一个省的天气,其中列出该省各个市的数据,北京就列出各个区。
tmp1是最低温低,tmp2是最高温度,state1和state2是神马转神马,每个数代表一个天气现象。
2. 图片接口
http://m.weather.com.cn/img/c0.gif
http://m.weather.com.cn/img/b0.gif
http://www.weather.com.cn/m/i/weatherpic/29x20/d0.gif
http://www.weather.com.cn/m2/i/icon_weather/29x20/n00.gif
这个图就是天气现象0(晴)的图片,其他天气现象的图片依此类推。c打头的图片是20*20像素的,b打头的是50*46像素的,d打头的是反白的图标,29*20像素,n打头的是夜间反白图标,29*20像素,注意这里的文件名是两位数字!
3. JSON接口
http://m.weather.com.cn/data/101010100.html
http://www.weather.com.cn/data/sk/101010100.html
http://www.weather.com.cn/data/cityinfo/101010100.html
各个城市的代码,自己百度一下。例如:北京的代码就是101010100
二、中华万年历API接口:
1、JSON
http://wthrcdn.etouch.cn/weather_mini?city=北京
http://wthrcdn.etouch.cn/weather_mini?citykey=101010100
2、XML
http://wthrcdn.etouch.cn/WeatherApi?city=北京
http://wthrcdn.etouch.cn/WeatherApi?citykey=101010100
三、新浪天气API接口:
http://php.weather.sina.com.cn/xml.php?city=%B9%E3%D6%DD&password=DJOYnieT8234jlsK&day=1
city=城市的URL编码(广州:%B9%E3%D6%DD)。
password固定。
day=0,表示当天天气,1表示第二天天气,以此类推,最大取值为4。
新浪天气图片:
78*78:
白天:http://php.weather.sina.com.cn/images/yb3/78_78/duoyun_0.png
夜间:http://php.weather.sina.com.cn/images/yb3/78_78/duoyun_1.png
180*180:
白天:http://php.weather.sina.com.cn/images/yb3/180_180/duoyun_0.png
夜间:http://php.weather.sina.com.cn/images/yb3/180_180/duoyun_1.png
@font-face {
font-family: 'MathJax_Main';
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot'); /* IE9 Compat Modes */
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot?iefix') format('eot'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff') format('woff'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf') format('opentype'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg#MathJax_Math-Italic') format('svg');
}
@font-face {
font-family: 'MathJax_Main';
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot'); /* IE9 Compat Modes */
src: url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot?iefix') format('eot'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff') format('woff'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf') format('opentype'),
url('http://static.blog.csdn.net/mdeditor/public/res/bower-libs/MathJax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg#MathJax_Main-Regular') format('svg');
}
天气预报API接口的更多相关文章
- 聚合数据全国天气预报api接口
查询天气预报在APP中常用的一个常用功能,聚合数据全国天气预报api接口可以根据根据城市名/id查询天气.根据IP查询天气.据GPS坐标查询天气.查询城市天气三小时预报,并且支持全国不同城市天气预报查 ...
- 常用天气预报API接口整理(转)
文章转自:http://www.nohacks.cn/post-35.html 自序: 由nohacks.cn 收集整理,来源于网络,版权归原作者所有,基本收集了网络上能使用的大部分天气API接口,作 ...
- 免费天气预报API接口
一.中国气象局(http://www.weather.com.cn) 1.实时接口 http://mobile.weather.com.cn/data/sk/101010100.html http:/ ...
- 如何用全国天气预报API接口进行快速开发
最近公司项目有一个全国天气预报的小需求,想着如果用现成的API就可以大大提高开发效率,在网上的API商店搜索了一番,发现了 APISpace,它里面的全国天气预报API非常符合我的开发需求. 全国 ...
- 免费的无次数限制的各类API接口(2)
之前整理过一些聚合数据上的免费API(各类免费的API接口分享,无限次),这次还有一些其他的进行了整理,主要是聚合数据上和API Store上的一些,还有一些其他的. 聚合数据提供30大类,160种以 ...
- 各类无次数限制的免费API接口整理
各类无次数限制的免费API接口整理,主要是聚合数据上和API Store上的一些,还有一些其他的. 聚合数据提供30大类,160种以上基础数据API服务,国内最大的基础数据API服务,下面就罗列一些免 ...
- 网络免费API接口整理
转载自: https://www.cnblogs.com/doit8791/p/9351629.html 从网上看到一些免费API接口,在个人开发小程序等应用练手时可试用. 各类无次数限制的免费API ...
- 各类无次数限制的免费API接口,再也不怕找不到免费API了
各类无次数限制的免费API接口整理,主要是聚合数据上和API Store上的一些,还有一些其他的. 聚合数据提供30大类,160种以上基础数据API服务,国内最大的基础数据API服务,下面就罗列一些免 ...
- 免费API接口记录
用来记录一些无次数限制的免费API接口,主要是聚合数据上和API Store上的一些,还有一些其他的. 手机号码归属地API接口: https://www.juhe.cn/docs/api/id/11 ...
随机推荐
- [TypeScript] Using ES6 and ESNext with TypeScript
TypeScript is very particular about what is and isn't allowed in a TS file to protect you from commo ...
- Opencv Surf算子中keyPoints,描述子Mat矩阵,配对向量DMatch里都包含了哪些好玩的东东?
Surf算法是一把牛刀,我们可以很轻易的从网上或各种Opencv教程里找到Surf的用例,把例程中的代码或贴或敲过来,满心期待的按下F5,当屏幕终于被满屏花花绿绿的小圆点或者N多道连接线条霸占时,内心 ...
- (ubuntu 下)tensorflow 的安装及版本升级
对于 CPU 版本 pip3 install –upgrade tensorflow 对于 GPU 版本: pip3 install –upgrade tensorflow-gpu [TensorFl ...
- 【a703】求逆序对
Time Limit: 10 second Memory Limit: 2 MB 问题描述 给定一个序列a1,a2...an.如果存在i小于j 并且ai大于aj,那么我们称之为逆序对,求给定序列中逆序 ...
- Java Math数字处理类与包装类习题
//创建Integer类对象,并以int型返回 Integer intAb = new Integer("123"); System.out.println(intAb.intVa ...
- 【烽火传递】dp + 单调队列优化
题目描述 烽火台又称烽燧,是重要的防御设施,一般建在险要处或交通要道上.一旦有敌情发生,白天燃烧柴草,通过浓烟表达信息:夜晚燃烧干柴,以火光传递军情.在某两座城市之间有 n 个烽火台,每个烽火台发出信 ...
- MSYS是一个小型的GNU环境,包括基本的bash,make等等,与Cygwin大致相当(双击“D:\MinGW\msys\1.0\msys.bat”,启动MinGW终端)
1 简介 MinGW,是Minimalist GNUfor Windows的缩写.它是一个可自由使用和自由发布的Windows特定头文件和使用GNU工具集导入库的集合,允许你在GNU/Linux和 ...
- 【29.89%】【codeforces 734D】Anton and Chess
time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- KindEditor4.1.10,支持粘贴图片
转载自https://blog.csdn.net/jimmy0021/article/details/73251406 我已经忘记我是不是从这个博主的那里找到的解决kindeditor粘贴图片的方法了 ...
- hibernate annotation 相关主键生成策略
Hibernate 默认的全面支持 13 物种生成策略 : 1. increment 2. identity 3. sequence 4. hilo 5. seqhilo 6. uuid 7. uu ...