1 Star 0 Fork 159

可可味 / zoning

forked from netnr / zoning 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

zoning

中华人民共和国行政区划:省级、地级、县级、乡级和村级

Demo: https://ss.netnr.com/zoning
Gitee: https://gitee.com/netnr/zoning
GitHub: https://github.com/netnr/zoning

变更日志

来源

使用

  • 打开页面 http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm
  • 打开浏览器控制台(推荐Chrome、Firefox,请不要用IE系列,谢谢)
  • 拷贝脚本zoning.js的内容粘贴到控制台运行
  • 首次抓取会出现大量失败请求,再次抓取会从浏览器缓存获取,非常快
  • Chrome比较快,会出现几个链接抓取失败
  • Firefox比较稳定,抓取有保障,内存占用高(推荐,测试版本:61.0.2 64-bit)
  • build.html用于导出的JSON文件生成SQLiteCSV
  • CSV导出编码为utf-8,Excel打开中文会乱码,需要转换编码为ANSI指定BOM
  • 爬取截图1爬取截图2爬取截图3

发布

  • 支持的格式有:JSON文件、SQLite数据库、CSV文件、SQL脚本
  • zoning-*.json所有数据, zoning-*.dbSQLite数据库, zoning-*.csvCSV文件,zoning-*.sqlSQL脚本
  • dist/zoning-5 五级
  • dist/zoning-4 四级
  • dist/zoning-3 三级
  • npm,npm install zoningjshttps://unpkg.com/zoningjs/

联系打赏

MIT License Copyright (c) 2018 netnr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

中华人民共和国行政区划:省级(省份直辖市自治区)、 地级(城市)、 县级(区县)、 乡级(乡镇街道)、 村级(村委会居委会) 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/cocoa_flavor/zoning.git
git@gitee.com:cocoa_flavor/zoning.git
cocoa_flavor
zoning
zoning
master

搜索帮助

14c37bed 8189591 565d56ea 8189591