1.1月23日至24日中东部地区雨雪天气持续 陕晋豫鄂等地部分地区有中到大雪

2.全国各省天气预报显示

3.iOS开发,想知道国家气象局api返回过来的天气数据将天气总共描述为几种类型,

集宁天气预报七天_集宁天气预报七天准确

内蒙古>乌兰察布>集宁 天气预报

10月06日(周四)

小雨

7~13℃

西南风 3-4级

10月07日(周五)

0~12℃

西北风 3-4级

1月23日至24日中东部地区雨雪天气持续 陕晋豫鄂等地部分地区有中到大雪

名称:新浪天气预报代码

代码 :<IFRAME ID='ifm2' WIDTH='260' HEIGHT='70' ALIGN='CENTER' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' src="://news.sina.cn/iframe/weather/130101.html"></iframe>

说明 :这种适合于在网页的头栏插入。上面的城市可以自定,比如 石家庄可改成别的。

城市代码:

"110100","北京"

"120100","天津"

"130101","石家庄"

"130201","唐山"

"130301","秦皇岛"

"130701","张家口"

"130801","承德"

"131001","廊坊"

"130401","邯郸"

"130501","邢台"

"130601","保定"

"130901","沧州"

"133001","衡水"

"140101","太原"

"140201","大同"

"140301","阳泉"

"140501","晋城"

"140601","朔州"

"142201","忻州"

"142331","离石"

"142401","榆次"

"142601","临汾"

"142701","运城"

"140401","长治"

"150101","呼和浩特"

"150201","包头"

"150301","乌海"

"152601","集宁"

"152701","巴彦浩特"

"152801","临河"

"152921","鄂尔多斯"

"150401","赤峰"

"152301","通辽"

"152502","锡林浩特"

"152101","海拉尔"

"152201","乌兰浩特"

"210101","沈阳"

"210201","大连"

"210301","鞍山"

"210401","抚顺"

"210501","本溪"

"210701","锦州"

"210801","营口"

"210901","阜新"

"211101","盘锦"

"211201","铁岭"

"211301","朝阳"

"211401","葫芦岛"

"210601","丹东"

"220101","长春"

"220201","吉林"

"220301","四平"

"220401","辽源"

"220601","松原"

"222301","白城"

"222401","延边"

"220501","通化"

"230101","哈尔滨"

"230301","鸡西"

"230401","鹤岗"

"230501","双鸭山"

"230701","伊春"

"230801","佳木斯"

"230901","七台河"

"231001","牡丹江"

"232301","绥化"

"230201","齐齐哈尔"

"230601","大庆"

"232601","黑河"

"232700","大兴安岭"

"310100","上海"

"320101","南京"

"320201","无锡"

"320301","徐州"

"320401","常州"

"320501","苏州"

"320600","南通"

"320701","连云港"

"320801","淮阴"

"320901","盐城"

"321001","扬州"

"321101","镇江"

"321102","泰州"

"321103","宿迁"

"330101","杭州"

"330201","宁波"

"330301","温州"

"330401","嘉兴"

"330501","湖州"

"330601","绍兴"

"330701","金华"

"330801","衢州"

"330901","舟山"

"332501","丽水"

"332602","台州"

"340101","合肥"

"340201","芜湖"

"340301","蚌埠"

"340401","淮南"

"340501","马鞍山"

"340601","淮北"

"340701","铜陵"

"340801","安庆"

"341001","黄山市"

"342101","阜阳"

"342201","宿州"

"342301","滁州"

"342401","六安"

"342501","宣城"

"342601","巢湖"

"342901","池州"

"350101","福州"

"350201","厦门"

"350301","莆田"

"350401","三明"

"350501","泉州"

"350601","漳州"

"352101","南平"

"352201","宁德"

"352601","龙岩"

"352602","陇南"

"352603","庆阳"

"360101","南昌"

"360201","景德镇"

"362101","赣州"

"360301","萍乡"

"360401","九江"

"360501","新余"

"360601","鹰潭"

"362201","宜春"

"362301","上饶"

"362401","吉安"

"370101","济南"

"370201","青岛"

"370301","淄博"

"370401","枣庄"

"370501","东营"

"370601","烟台"

"370701","潍坊"

"370801","济宁"

"370901","泰安"

"371001","威海"

"371100","日照"

"372301","滨州"

"372401","德州"

"372501","聊城"

"372801","临沂"

"372901","菏泽"

"372902","莱芜"

"410101","郑州"

"410201","开封"

"410301","洛阳"

"410401","平顶山"

"410501","安阳"

"410601","鹤壁"

"410701","新乡"

"410801","焦作"

"410901","濮阳"

"411001","许昌"

"411101","漯河"

"411201","三门峡"

"412301","商丘"

"412701","周口"

"412801","驻马店"

"412901","南阳"

"413001","信阳"

"420101","武汉"

"420201","黄石"

"420301","十堰"

"420400","随州"

"420501","宜昌"

"420601","襄樊"

"420701","鄂州"

"420801","荆门"

"422103","黄冈"

"422201","孝感"

"422301","咸宁"

"422421","荆州"

"422801","恩施"

"430101","长沙"

"430401","衡阳"

"430501","邵阳"

"432801","郴州"

"432901","永州"

"430801","韶山"

"430802","张家界"

"433001","怀化"

"433101","吉首"

"430201","株洲"

"430301","湘潭"

"430601","岳阳"

"430701","常德"

"432301","益阳"

"432501","娄底"

"440101","广州"

"440301","深圳"

"441501","汕尾"

"441301","惠州"

"441601","河源"

"441801","清远"

"441901","东莞"

"440401","珠海"

"440701","江门"

"441201","肇庆"

"442001","中山"

"440801","湛江"

"440901","茂名"

"440201","韶关"

"440501","汕头"

"441401","梅州"

"441701","阳江"

"441702","潮州"

"441703","顺德"

"441704","揭阳"

"441705","云浮"

"450101","南宁"

"450401","梧州"

"452501","玉林"

"450301","桂林"

"452601","百色"

"452701","河池"

"452802","钦州"

"450201","柳州"

"450501","北海"

"450502","防城港"

"450503","贵港"

"450504","贺州"

"460100","海口"

"460200","三亚"

"460300","西沙群岛"

"510101","成都"

"513321","眉山"

"513101","雅安"

"513229","峨嵋山"

"510301","自贡"

"500100","重庆"

"500102","万州"

"500103","涪陵"

"512901","南充"

"510501","泸州"

"510601","德阳"

"510701","绵阳"

"510901","遂宁"

"511001","内江"

"511101","乐山"

"512501","宜宾"

"510801","广元"

"513021","达州"

"513401","资阳"

"510401","攀枝花"

"510402","阿坝"

"510403","甘孜"

"510404","凉山"

"510405","广安"

"510406","巴中"

"500239","黔江"

"520101","贵阳"

"520200","六盘水"

"522201","铜仁"

"522501","安顺"

"522601","凯里"

"522701","都匀"

"522301","兴义"

"522421","毕节"

"522101","遵义"

"530101","昆明"

"530201","德宏"

"532201","曲靖"

"532301","楚雄"

"532401","玉溪"

"532501","红河"

"532621","文山"

"532721","思茅"

"532101","昭通"

"532821","西双版纳"

"532901","大理"

"533001","保山"

"533121","怒江"

"533221","丽江"

"533321","迪庆"

"533521","临沧"

"540101","拉萨"

"542121","昌都"

"542221","山南"

"542301","日喀则"

"542421","那曲"

"542523","阿里"

"542621","林芝"

"610101","西安"

"610201","铜川"

"610301","宝鸡"

"610401","咸阳"

"612101","渭南"

"612301","汉中"

"612401","安康"

"612501","商洛"

"612601","延安"

"612701","榆林"

"620101","兰州"

"620401","白银"

"620301","金昌"

"620501","天水"

"622201","张掖"

"622301","武威"

"622421","定西"

"622701","平凉"

"622901","临夏"

"620201","嘉峪关"

"622102","酒泉"

"630100","西宁"

"632121","果洛"

"632221","海西"

"632321","格尔木"

"632521","海东"

"632621","海北"

"632721","玉树"

"632802","黄南"

"640101","银川"

"640201","石嘴山"

"642101","吴忠"

"642221","固原"

"650101","乌鲁木齐"

"650201","克拉玛依"

"652101","吐鲁番"

"652201","哈密"

"652301","昌吉"

"652701","博乐"

"652801","库尔勒"

"652901","阿克苏"

"653001","克州"

"653101","喀什"

"654101","伊犁"

"655001","石河子"

"655002","塔城"

"655003","阿勒泰"

"710001","台北"

"211001","辽阳"

"653201","和田"

"820000","澳门"

"810000","香港"

://.kingdeone

全国各省天气预报显示

今明天(1月23日至24日),中东部地区大范围雨雪天气持续,陕西、山西、河南、湖北等地部分地区有中到大雪,西藏西南部局地有暴雪;湖南北部、湖北中东部、江西中北部、安徽南部、江苏南部等地的部分地区有中雨,局地大雨,需注意防范。

 一、全国天气实况

 昨日(1月22日),甘肃东部、陕西中南部、山西南部、河南、山东、湖北西北部和南部等地出现小雪或雨夹雪,其中,陕西东部、河南西部、山东中部局地中雪,新增积雪深度2~5厘米;浙江北部、江西北部、湖南中南部、广西东北部部分地区出现大雨,江西萍乡、湖南衡阳等局地暴雨(50~96毫米)。

 二、全国天气预报

 中东部地区大范围雨雪天气持续。预计23日至24日,西藏南部、甘肃东南部、陕西中南部、河南大部、山西西南部、湖北西北部等地的部分地区有中到大雪,西藏西南部局地有暴雪,上述地区新增积雪深度3~8厘米,局地超过10厘米;湖南北部、湖北中东部、江西中北部、安徽南部、江苏南部等地的部分地区有中雨,局地大雨。

 具体预报如下:

 23日中午至夜间,新疆南疆盆地、西藏大部、西北地区中东部、华北南部和西部、黄淮西部等地部分地区有小雪或雨夹雪,陕西东部、山西南部、河南中西部、湖北西北部、西藏南部等地有中到大雪(3~8毫米),西藏西南部局地暴雪(10~18毫米)。安徽中南部、江苏南部、浙江北部、广西东南部、广东中部和西北部等地部分地区有中雨。

 24日,内蒙古中东部、黑龙江西部、新疆南疆盆地、西藏大部、西北地区中东部、黄淮西部、西南地区北部等地部分地区有小到中雪或雨夹雪,其中,西藏东南部等地部分地区有大到暴雪。西藏东南部、广东中部等地部分地区有中雨。

 三、北京地区天气预报

 预计23日中午至24日,北京天气以阴为主,部分地区有零星小雪;期间能见度较差,最低能见度1~2公里;气温较低,平原地区白天最高气温1~2℃,夜间最低气温-5~-6℃。

 北京地区天气预报(1月23日中午至24日)

 四、海上天气预报

 23日午后至夜间,黄海南部海域、台湾海峡将有5~7级、阵风8级的东北风,东海大部海域、台湾以东洋面将有6~7级、阵风8级的旋转风,其中东海东部海域的部分海域风力可达8级、阵风9级。另外,雷州半岛东部沿岸、琼州海峡、北部湾、浙闽沿岸海域将有能见度不足10公里的轻雾,其中北部湾部分海域有能见度不足1公里的大雾。

 24日白天至夜间,东海大部海域、台湾海峡、台湾以东洋面、巴士海峡、南海北部海域将有6~7级、阵风8级的东北风。

 五、全国道路交通影响预报

 预计23日中午至24日中午,新疆南疆盆地、西藏大部、西北地区东部、内蒙古中东部、华北南部和西部、黄淮西部等地部分道路受小到中雪或雨夹雪影响,其中,河南南部局部路段受大雪影响;江淮、江汉、江南、西南地区东部、华南等地部分道路受小到中雨影响;安徽中西部、河南东南部、福建中东部、四川东南部、重庆西南部、贵州西南部等地部分道路受雾影响能见度低。

 六、全国铁路交通气象影响预报

 预计23日中午至24日中午,内蒙古中南部、陕西大部、甘肃南部、山西中部和南部、河北中南部、山东西南部、河南大部、湖北北部等地受降雪天气影响,京包线集宁南-土墨特右旗、京广线定州-驻马店、京九线衡水-亳州、陇海线陇西-宿州、焦柳线襄阳-月山、襄渝线旬阳县-襄阳北、青藏线开心岭-那曲等铁路线路运行、检修等受低温冰冻和积雪影响的风险较高。

 七、全国机场气象影响预报

 预计23日中午至24日中午,全国大部机场适航;云南东部、贵州、广西、广东、湖南南部、江西、福建等地的中低空空域有轻到中度颠簸;甘肃东部、陕西、山西南部、河南、安徽北部等地的低空空域有积冰条件。23日中午至夜间,乌鲁木齐机场能见度500米左右,郑州、太原等机场有小雪。

 八、长江干线航道气象影响预报

 23日下午,长江干线四川、重庆、湖北、江西、安徽部分航段受雨雾影响,能见度低。湖北中东部、江西、安徽、江苏大部航段有6级以上阵风。低能见度影响航段:宜宾-重庆、重庆-三峡、三峡-宜昌、宜昌-岳阳、岳阳-武汉、武汉-黄石、黄石-九江、九江-芜湖;大风影响航段:宜昌-荆州、荆州-岳阳、岳阳-武汉、武汉-黄石、九江-芜湖、芜湖-南京、南京-太仓。

 23日夜间,长江干线四川、重庆、湖北、江西、安徽部分航段受雨雾影响,能见度低。湖北、江西、安徽、江苏部分航段有6级左右阵风。低能见度影响航段:宜宾-重庆、重庆-三峡、三峡-宜昌、宜昌-岳阳、岳阳-武汉、武汉-黄石、黄石-九江、九江-芜湖;大风影响航段:重庆-三峡、荆州-岳阳、黄石-九江、九江-安庆、南京-太仓。

 九、关注与建议

 23日至24日中东部地区雨雪天气持续,陕西、山西、河南、湖北等地有中雪,上述地区已有不同程度积雪,需防范降雪、积雪结冰、低能见度对交通的不利影响;南方地区防范降雨和路面湿滑对交通的不利影响。

iOS开发,想知道国家气象局api返回过来的天气数据将天气总共描述为几种类型,

北京晴转多云19℃ / 32℃

澳门多云26℃ / 33℃

长春晴14℃ / 29℃

长沙市多云24℃ / 35℃

成都阵雨18℃ / 25℃

福州晴转多云23℃ / 35℃

广州雷阵雨25℃ / 33℃

贵阳多云18℃ / 29℃

哈尔滨晴14℃ / 27℃

海口雷阵雨26℃ / 30℃

杭州多云转阴22℃ / 30℃

合肥多云19℃ / 30℃

呼和浩特晴13℃ / 27℃

济南多云20℃ / 30℃

昆明多云转小雨15℃ / 22℃

兰州晴12℃ / 28℃

拉萨小雨转阵雨9℃ / 19℃

南昌多云25℃ / 35℃

南京多云21℃ / 30℃

南宁小雨24℃ / 30℃

沈阳晴15℃ / 31℃

石家庄多云21℃ / 30℃

台北晴24℃ / 30℃

太原阴转小雨16℃ / 27℃

天津晴转多云21℃ / 31℃

武汉多云24℃ / 33℃

乌鲁木齐晴21℃ / 32℃

西安阵雨转多云17℃ / 27℃

香港晴28℃ / 33℃

西宁晴7℃ / 21℃

徐家汇多云23℃ / 29℃

银川多云13℃ / 27℃

郑州阴转小雨22℃ / 28℃

北京晴转多云19℃ / 32℃

呼和浩特晴13℃ / 27℃

石家庄多云21℃ / 30℃

太原阴转小雨16℃ / 27℃

天津晴转多云21℃ / 31℃

阿拉善右旗晴14℃ / 30℃

阿拉善左旗晴15℃ / 26℃

巴林右旗晴13℃ / 31℃

保定多云17℃ / 31℃

包头晴转多云13℃ / 26℃

沧州晴转多云18℃ / 31℃

长治小雨15℃ / 21℃

承德晴转多云16℃ / 34℃

赤峰晴转多云17℃ / 31℃

大同阴9℃ / 27℃

东胜多云14℃ / 24℃

二连浩特晴13℃ / 31℃

海拉尔晴9℃ / 30℃

邯郸阴转小雨20℃ / 30℃

衡水多云19℃ / 30℃

晋城小雨17℃ / 25℃

集宁晴转多云11℃ / 25℃

廊坊多云19℃ / 31℃

黎城阴转小雨15℃ / 24℃

临汾小雨19℃ / 26℃

临河晴13℃ / 27℃

吕梁阴转小雨15℃ / 25℃

平遥阴转小雨16℃ / 24℃

秦皇岛多云17℃ / 29℃

任丘晴转多云20℃ / 31℃

容城多云18℃ / 31℃

朔州阴11℃ / 26℃

唐山晴18℃ / 32℃

通辽晴17℃ / 31℃

文水阴转小雨16℃ / 26℃

乌海晴转多云13℃ / 28℃

乌兰浩特晴14℃ / 29℃

五台山阴9℃ / 19℃

锡林浩特晴12℃ / 32℃

邢台晴转多云21℃ / 28℃

忻州阴13℃ / 25℃

阳泉阴16℃ / 27℃

运城小雨19℃ / 24℃

张家口多云16℃ / 30℃

之前做过相关的App,网上搜出来的,直接粘贴了。有用请纳哦~

国家气象局提供的天气预报接口

接口地址:

://.weather.cn/data/sk/101010100.html

://.weather.cn/data/cityinfo/101010100.html

://m.weather.cn/data/101010100.html

对于第三个接口,返回信息比较全面,也是以json格式提供,格式如下

{"weatherinfo": {//基本信息;"city":"北京","city_en":"beijing","date_y":"2012年2月16日", "date":"", "week":"星期四", "fchh":"11", "cityid":"101010100",//摄氏温度"temp1":"2℃~-7℃","temp2":"1℃~-7℃","temp3":"4℃~-7℃","temp4":"7℃~-5℃","temp5":"5℃~-3℃","temp6":"5℃~-2℃",//华氏温度;"tempF1":"35.6℉~19.4℉","tempF2":"33.8℉~19.4℉","tempF3":"39.2℉~19.4℉","tempF4":"44.6℉~23℉","tempF5":"41℉~26.6℉","tempF6":"41℉~28.4℉",//天气描述;"weather1":"晴","weather2":"晴","weather3":"晴","weather4":"晴转多云","weather5":"多云","weather6":"多云转阴",//天气描述序号"img1":"0","img2":"99","img3":"0","img4":"99","img5":"0","img6":"99","img7":"0","img8":"1","img9":"1","img10":"99","img11":"1","img12":"2","img_single":"0",//名称;"img_title1":"晴","img_title2":"晴","img_title3":"晴","img_title4":"晴","img_title5":"晴","img_title6":"晴","img_title7":"晴","img_title8":"多云","img_title9":"多云","img_title10":"多云","img_title11":"多云","img_title12":"阴","img_title_single":"晴",//风速描述"wind1":"北风3-4级转微风","wind2":"微风","wind3":"微风","wind4":"微风","wind5":"微风","wind6":"微风",//风速级别描述"fx1":"北风","fx2":"微风","fl1":"3-4级转小于3级","fl2":"小于3级","fl3":"小于3级","fl4":"小于3级","fl5":"小于3级","fl6":"小于3级",//今天穿衣指数;"index":"冷","index_d":"天气冷,建议着棉衣、皮夹克加羊毛衫等冬季服装。年老体弱者宜着厚棉衣或冬大衣。",//48小时穿衣指数"index48":"冷","index48_d":"天气冷,建议着棉衣、皮夹克加羊毛衫等冬季服装。年老体弱者宜着厚棉衣或冬大衣。",//紫外线及48小时紫外线"index_uv":"弱","index48_uv":"弱",//洗车"index_xc":"适宜",//旅游"index_tr":"一般",//舒适指数"index_co":"较不舒适","st1":"1","st2":"-8","st3":"2","st4":"-4","st5":"5","st6":"-5",//晨练"index_cl":"较不宜",//晾晒"index_ls":"基本适宜",//过敏"index_ag":"极不易发"}}

全国各城市代码如下:

北京:101010100朝阳:101010300顺义:101010400怀柔:101010500通州:101010600昌平:101010700延庆:101010800丰台:101010900石景山:101011000大兴:101011100房山:101011200密云:101011300门头沟:101011400平谷:101011500八达岭:101011600佛爷顶:101011700汤河口:101011800密云上甸子:101011900斋堂:101012000霞云岭:101012100北京城区:101012200海淀:101010200天津:101030100宝坻:101030300东丽:101030400西青:101030500北辰:101030600蓟县:101031400汉沽:101030800静海:101030900津南:101031000塘沽:101031100大港:101031200武清:101030200宁河:101030700上海:101020100宝山:101020300嘉定:101020500南汇:101020600浦东:101021300青浦:101020800松江:101020900奉贤:101021000崇明:101021100徐家汇:101021200闵行:101020200金山:101020700石家庄:101090101张家口:101090301承德:101090402唐山:101090501秦皇岛:101091101沧州:101090701衡水:101090801邢台:101090901邯郸:101091001保定:101090201廊坊:101090601郑州:101180101新乡:101180301许昌:101180401平顶山:101180501信阳:101180601南阳:101180701开封:101180801洛阳:101180901商丘:101181001焦作:101181101鹤壁:101181201濮阳:101181301周口:101181401漯河:101181501驻马店:101181601三门峡:101181701济源:101181801安阳:101180201合肥:101220101芜湖:101220301淮南:101220401马鞍山:101220501安庆:101220601宿州:101220701阜阳:101220801亳州:101220901黄山:101221001滁州:101221101淮北:101221201铜陵:101221301宣城:101221401六安:101221501巢湖:101221601池州:101221701蚌埠:101220201杭州:101210101舟山:101211101湖州:101210201嘉兴:101210301金华:101210901绍兴:101210501台州:101210601温州:101210701丽水:101210801衢州:101211001宁波:101210401重庆:101040100合川:101040300南川:101040400江津:101040500万盛:101040600渝北:101040700北碚:101040800巴南:101040900长寿:101041000黔江:101041100万州天城:101041200万州龙宝:101041300涪陵:101041400开县:101041500城口:101041600云阳:101041700巫溪:101041800奉节:101041900巫山:101042000潼南:101042100垫江:101042200梁平:101042300忠县:101042400石柱:101042500大足:101042600荣昌:101042700铜梁:101042800璧山:101042900丰都:101043000武隆:101043100彭水:101043200綦江:101043300酉阳:101043400秀山:101043600沙坪坝:101043700永川:101040200福州:101230101泉州:101230501漳州:101230601龙岩:101230701晋江:101230509南平:101230901厦门:101230201宁德:101230301莆田:101230401三明:101230801兰州:101160101平凉:101160301庆阳:101160401武威:101160501金昌:101160601嘉峪关:101161401酒泉:101160801天水:101160901武都:101161001临夏:101161101合作:101161201白银:101161301定西:101160201张掖:101160701广州:101280101惠州:101280301梅州:101280401汕头:101280501深圳:101280601珠海:101280701佛山:101280800肇庆:101280901湛江:101281001江门:101281101河源:101281201清远:101281301云浮:101281401潮州:101281501东莞:101281601中山:101281701阳江:101281801揭阳:101281901茂名:101282001汕尾:101282101韶关:101280201南宁:101300101柳州:101300301来宾:101300401桂林:101300501梧州:101300601防城港:101301401贵港:101300801玉林:101300901百色:101301001钦州:101301101河池:101301201北海:101301301崇左:101300201贺州:101300701贵阳:101260101安顺:101260301都匀:101260401兴义:101260906铜仁:101260601毕节:101260701六盘水:101260801遵义:101260201凯里:101260501昆明:101290101红河:101290301文山:101290601玉溪:101290701楚雄:101290801普洱:101290901昭通:101291001临沧:101291101怒江:101291201香格里拉:101291301丽江:101291401德宏:101291501景洪:101291601大理:101290201曲靖:101290401保山:101290501呼和浩特:101080101乌海:101080301集宁:101080401通辽:101080501阿拉善左旗:101081201鄂尔多斯:101080701临河:101080801锡林浩特:101080901呼伦贝尔:101081000乌兰浩特:101081101包头:101080201赤峰:101080601南昌:101240101上饶:101240301抚州:101240401宜春:101240501鹰潭:101241101赣州:101240701景德镇:101240801萍乡:101240901新余:101241001九江:101240201吉安:101240601武汉:101200101黄冈:101200501荆州:101200801宜昌:101200901恩施:101201001十堰:101201101神农架:101201201随州:101201301荆门:101201401天门:101201501仙桃:101201601潜江:101201701襄樊:101200201鄂州:101200301孝感:101200401黄石:101200601咸宁:101200701成都:101270101自贡:101270301绵阳:101270401南充:101270501达州:101270601遂宁:101270701广安:101270801巴中:101270901泸州:101271001宜宾:101271101内江:101271201资阳:101271301乐山:101271401眉山:101271501凉山:101271601雅安:101271701甘孜:101271801阿坝:101271901德阳:101272001广元:101272101攀枝花:101270201银川:101170101中卫:101170501固原:101170401石嘴山:101170201吴忠:101170301西宁:101150101黄南:101150301海北:101150801果洛:101150501玉树:101150601海西:101150701海东:101150201海南:101150401济南:101120101潍坊:101120601临沂:101120901菏泽:101121001滨州:101121101东营:101121201威海:101121301枣庄:101121401日照:101121501莱芜:101121601聊城:101121701青岛:101120201淄博:101120301德州:101120401烟台:101120501济宁:101120701泰安:101120801西安:101110101延安:101110300榆林:101110401铜川:101111001商洛:101110601安康:101110701汉中:101110801宝鸡:101110901咸阳:101110200渭南:101110501太原:101100101临汾:101100701运城:101100801朔州:101100901忻州:101101001长治:101100501大同:101100201阳泉:101100301晋中:101100401晋城:101100601吕梁:101101100乌鲁木齐:101130101石河子:101130301昌吉:101130401吐鲁番:101130501库尔勒:101130601阿拉尔:101130701阿克苏:101130801喀什:101130901伊宁:101131001塔城:101131101哈密:101131201和田:101131301阿勒泰:101131401阿图什:101131501博乐:101131601克拉玛依:101130201拉萨:101140101山南:101140301阿里:101140701昌都:101140501那曲:101140601日喀则:101140201林芝:101140401台北县:101340101高雄:101340201台中:101340401海口:101310101三亚:101310201东方:101310202临高:101310203澄迈:101310204儋州:101310205昌江:101310206白沙:101310207琼中:101310208定安:101310209屯昌:101310210琼海:101310211文昌:101310212保亭:101310214万宁:101310215陵水:101310216西沙:101310217南沙岛:101310220乐东:101310221五指山:101310222琼山:101310102长沙:101250101株洲:101250301衡阳:101250401郴州:101250501常德:101250601益阳:101250700娄底:101250801邵阳:101250901岳阳:101251001张家界:101251101怀化:101251201黔阳:101251301永州:101251401吉首:101251501湘潭:101250201南京:101190101镇江:101190301苏州:101190401南通:101190501扬州:101190601宿迁:101191301徐州:101190801淮安:101190901连云港:101191001常州:101191101泰州:101191201无锡:101190201盐城:101190701哈尔滨:101050101牡丹江:101050301佳木斯:101050401绥化:101050501黑河:101050601双鸭山:101051301伊春:101050801大庆:101050901七台河:101051002鸡西:101051101鹤岗:101051201齐齐哈尔:101050201大兴安岭:101050701长春:101060101延吉:101060301四平:101060401白山:101060901白城:101060601辽源:101060701松原:101060801吉林:101060201通化:101060501沈阳:101070101鞍山:101070301抚顺:101070401本溪:101070501丹东:101070601葫芦岛:101071401营口:101070801阜新:101070901辽阳:101071001铁岭:101071101朝阳:101071201盘锦:101071301大连:101070201锦州:101070701

1. XML接口 ://flash.weather.cn/wmaps/xml/china.xml 这个是全国天气的根节点,列出所有的省,其中的pyName字段是各个省XML的文件名,比如北京的是beijing,那就意味着北京的XML地址为 ://flash.weather.cn/wmaps/xml/beijing.xml 一个省的天气,其中列出该省各个市的数据,北京就列出各个区。 tmp1是最低温低,tmp2是最高温度,url非常重要,我们一会儿再说。state1和state2是神马转神马,每个数代表一个天气现象。天气现象非常多,我本想全部分析出来,后来直接放弃了这个想法。因为我看到了一个城市的天气现象的编码是26...我现在知道的有0.晴 1.多云 2.阴 6.雨夹雪 7.小雨 8.中雨 13.阵雪 14.小雪 其中后来发现知道这个没用,这个数字的主要作用是检索的!!!

2. 接口 ://m.weather.cn/img/c0.gif ://m.weather.cn/img/b0.gif ://.weather.cn/m/i/weatherpic/29x20/d0.gif ://.weather.cn/m2/i/icon_weather/29x20/n00.gif 这个图就是天气现象0(晴)的,其他天气现象的依此类推。c打头的是20*20像素的,b打头的是50*46像素的,d打头的是反白的图标,29*20像素,n打头的是夜间反白图标,29*20像素,注意这里的文件名是两位数字! 也许还有更多的图标,等待大家发掘啦~

3. JSON接口 真没想到~居然有JSON接口~JSON在iPhone上分析起来要比XML简单很多 ://m.weather.cn/data/101010200.html 这个是北京的JSON数据,那个HTML的名字是根据上文XML中的url得到的。这个JSON中包含了实时数据、7天天气预报、气象指数等丰富的数据

获取省级代码:://.weather.cn/data/list3/city.xml?level=1获取城市代码(比如安徽是22):://.weather.cn/data/list3/city22.xml?level=2获取区域代码(比如安庆是2206):://.weather.cn/data/list3/city2206.xml?level=3获取到安徽省安庆市望江县的代码是220607然后去加上中国代码请求URL:://m.weather.cn/data/101220607.html就可以获取当地天气。

另外再给几个有用的探索得到的URL:天气 FLASH实况:://flash.weather.cn/sk2/101220607.xml实况FLASH:://flash.weather.cn/sk2/shikuang.swf?id=101220607

选择菜单(注明,这里有四个INPUT,其中有一个被隐藏了,可用FIREFOX改下源代码查看):://.weather.cn/static/custom/search3.htm

实时天气(很有用哦):://.weather.cn/data/sk/101220607.html

1. XML接口

://flash.weather.cn/wmaps/xml/china.xml

这个是全国天气的根节点,列出所有的省,其中的pyName字段是各个省XML的文件名,比如北京的是beijing,那就意味着北京的XML地址为

://flash.weather.cn/wmaps/xml/beijing.xml

一个省的天气,其中列出该省各个市的数据,北京就列出各个区。

tmp1是最低温低,tmp2是最高温度,url非常重要,我们一会儿再说。state1和state2是神马转神马,每个数代表一个天气现 象。天气现象非常多,我本想全部分析出来,后来直接放弃了这个想法。因为我看到了一个城市的天气现象的编码是26...我现在知道的有0.晴 1.多云 2.阴 6.雨夹雪 7.小雨 8.中雨 13.阵雪 14.小雪

其中后来发现知道这个没用,这个数字的主要作用是检索的!!!

2. 接口

://m.weather.cn/img/c0.gif

://m.weather.cn/img/b0.gif

://.weather.cn/m/i/weatherpic/29x20/d0.gif

://.weather.cn/m2/i/icon_weather/29x20/n00.gif

这个图就是天气现象0(晴)的,其他天气现象的依此类推。c打头的是20*20像素的,b打头的是50*46像素的,d打头的是反白的图标,29*20像素,n打头的是夜间反白图标,29*20像素,注意这里的文件名是两位数字!

3. JSON接口

://m.weather.cn/data/101010100.html://.weather.cn/data/sk/101010100.html://.weather.cn/data/cityinfo/101010100.html