纯JAVA中国天气网天气预报抓取解析存MYSQL程序(原创)

上传者: opzoonzhuzhengke | 上传时间: 2021-03-17 17:12:14 | 文件大小: 2.24MB | 文件类型: ZIP
将中国天气网近六天(因为有些城市提供的接口只有五天数据,所以我暂时取5天,程序里依然是六天的标准)的天气情况抓取,用JSON解析,存入数据库,数据库是两张表,城市表和天气表。程序可以运行,两个表都能读入数据,城市表大致读入了423行数据,天气表大致读入了1800行数据。程序的缺点在于,暂时还没写注释,面向对象还未体现,没有实现每天定时抓取的性能,需要人工每天手动运行程序抓取数据。。。。。

文件下载

资源详情

[{"title":"( 22 个子文件 2.24MB ) 纯JAVA中国天气网天气预报抓取解析存MYSQL程序(原创)","children":[{"title":"CnWeather","children":[{"title":"bin","children":[{"title":"weather_code.properties <span style='color:#111;'> 9.04KB </span>","children":null,"spread":false},{"title":"com","children":[{"title":"zzk","children":[{"title":"cn","children":[{"title":"GetInfo.class <span style='color:#111;'> 3.57KB </span>","children":null,"spread":false},{"title":"InsertMysql.class <span style='color:#111;'> 2.92KB </span>","children":null,"spread":false},{"title":"ReadJson.class <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false},{"title":"TestWeather.class <span style='color:#111;'> 1.92KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"SQL","children":[{"title":"MySql <span style='color:#111;'> 705B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"weather_code.properties <span style='color:#111;'> 9.04KB </span>","children":null,"spread":false},{"title":"com","children":[{"title":"zzk","children":[{"title":"cn","children":[{"title":"ReadJson.java <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"TestWeather.java <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"InsertMysql.java <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"GetInfo.java <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 380B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"commons-logging-1.0.4.jar <span style='color:#111;'> 37.12KB </span>","children":null,"spread":false},{"title":"commons-beanutils-1.7.0.jar <span style='color:#111;'> 184.25KB </span>","children":null,"spread":false},{"title":"json-lib-2.2.1-jdk15.jar <span style='color:#111;'> 136.78KB </span>","children":null,"spread":false},{"title":"com.springsource.org.codehaus.jackson.mapper-1.0.0.jar <span style='color:#111;'> 263.57KB </span>","children":null,"spread":false},{"title":"ezmorph-1.0.4.jar <span style='color:#111;'> 84.36KB </span>","children":null,"spread":false},{"title":"commons-collections-3.2.jar <span style='color:#111;'> 557.87KB </span>","children":null,"spread":false},{"title":"com.springsource.org.apache.commons.httpclient-3.1.0.jar <span style='color:#111;'> 300.75KB </span>","children":null,"spread":false},{"title":"commons-lang-2.3.jar <span style='color:#111;'> 239.53KB </span>","children":null,"spread":false},{"title":"mysql-connector-java-5.1.6.jar <span style='color:#111;'> 686.78KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • u011896195 :
    挺好用的,已经用上了
    2018-08-21
  • liu_chen_yue :
    思路不错,虽然和我的有些差异,我参考了一部分,还是觉得写得不错
    2014-11-13
  • ykxlt :
    运行不了,json解析需要json格式,代码里解析的是网页的信息,因此解析不了
    2014-11-06
  • 熏 :
    不知道怎么用!
    2014-06-22
  • miaomiao_1989 :
    代码很有用,很值得参考,注释多点就更好了
    2014-05-27
  • uujay :
    这个思路很不错。不过目前天气的这个接口如果网站没有认证,很多时候都是连接超时的
    2013-09-17
  • liao_1000 :
    缺少 jar包 无法运行成功
    2013-08-03
  • shenguoyang :
    代码是非常值得参考的,不过注释比较少。
    2013-05-08
  • hq1015050507 :
    只要导入包就能够跑起来了
    2013-04-26
  • love452076852 :
    可以参考下代码!
    2013-04-25

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明