Skip to content

Commit

Permalink
feat: 国家统计局最新数据(截止时间:2018-10-31,发布时间:2019-01-31)
Browse files Browse the repository at this point in the history
  • Loading branch information
modood committed Apr 17, 2019
1 parent 30104e3 commit b4d22ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* [中华人民共和国国家统计局-统计用区划和城乡划分代码](http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/)
* [中华人民共和国国家统计局-统计用区划代码和城乡划分代码编制规则](http://www.stats.gov.cn/tjsj/tjbz/200911/t20091125_8667.html)
* 本项目已更新至:
* [2017年统计用区划代码和城乡划分代码(截止时间:2017-10-31,发布时间:2018-06-20](http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2017/index.html)
* [2018年统计用区划代码和城乡划分代码(截止时间:2018-10-31,发布时间:2019-01-31](http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2018/index.html)

## 数据下载

Expand Down
4 changes: 2 additions & 2 deletions lib/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const BufferHelper = require('bufferhelper')
* 村级(村委会居委会,Village) v
*/

const pReg = /<td><a href='(.*?).html'>(.*?)<br\/><\/a><\/td>/g
const pReg = /<td><a href='(.*?).html'>(.*?)<br><\/a><\/td>/g
const casReg = /<tr class='.*?'><td><a href=.*?>(.*?)<\/a><\/td><td><a href=.*?>(.*?)<\/a><\/td><\/tr>/g
const vReg = /<tr class='.*?'><td>(.*?)<\/td><td>.*?<\/td><td>(.*?)<\/td><\/tr>/g

const host = 'www.stats.gov.cn'
const path = '/tjsj/tjbz/tjyqhdmhcxhfdm/2017/#{route}.html'
const path = '/tjsj/tjbz/tjyqhdmhcxhfdm/2018/#{route}.html'

/**
* 抓取数据
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "china-division",
"version": "2.1.1",
"version": "2.2.0",
"description": "中华人民共和国行政区划:省份、城市、区县、乡镇(街道)、村(居)委会",
"main": "lib/export.js",
"scripts": {
Expand Down

0 comments on commit b4d22ca

Please sign in to comment.