java爬虫抓取行政区划,运用webmagic爬虫工具自动下载行政区划代码

【实例简介】

该程序能够通过爬虫工具自动下载国家统计中心的行政区划代码到指定的数据库中的表中。将工程导入eclipse中,运行GithubRepoPageProcessor类的main方法即可,需要对数据库进行配置,以及建相应表建表语句在database目录中。

【实例截图】

【核心代码】

e46b5f43-18e1-4bd5-82d1-8e80121e5abf

└── webmagic

├── bin

│   ├── com

│   │   └── webmagic

│   │   └── demo

│   │   ├── ConsolePipelinenew.class

│   │   ├── CsdnBlogDao.class

│   │   ├── GithubRepoPageProcessor.class

│   │   └── TestDomain.class

│   └── log4j.properties

├── database

│   └── createtable.sql

├── lib

│   ├── assertj-core-1.5.0.jar

│   ├── commons-codec-1.6.jar

│   ├── commons-collections-3.2.1.jar

│   ├── commons-io-1.3.2.jar

│   ├── commons-lang-2.6.jar

│   ├── commons-lang3-3.1.jar

│   ├── commons-logging-1.1.3.jar

│   ├── commons-pool-1.5.5.jar

│   ├── fastjson-1.1.37.jar

│   ├── guava-15.0.jar

│   ├── hamcrest-core-1.3.jar

│   ├── httpclient-4.3.3.jar

│   ├── httpcore-4.3.2.jar

│   ├── jedis-2.0.0.jar

│   ├── json-path-0.8.1.jar

│   ├── json-smart-1.1.1.jar

│   ├── jsoup-1.7.2.jar

│   ├── junit-4.11.jar

│   ├── log4j-1.2.17.jar

│   ├── ojdbc-6.0.jar

│   ├── slf4j-api-1.7.6.jar

│   ├── slf4j-log4j12-1.7.6.jar

│   ├── webmagic-core-0.5.2.jar

│   ├── webmagic-extension-0.5.2.jar

│   └── xsoup-0.2.4.jar

├── sdklog

│   ├── sdkclient_debug.log

│   └── sdkclient_info.log

└── src

├── com

│   └── webmagic

│   └── demo

│   ├── ConsolePipelinenew.java

│   ├── CsdnBlogDao.java

│   ├── GithubRepoPageProcessor.java

│   └── TestDomain.java

└── log4j.properties

12 directories, 38 files

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值