{"id":13850740,"url":"https://github.com/dwqs/area-puppeteer","last_synced_at":"2025-09-08T15:31:56.320Z","repository":{"id":87782373,"uuid":"129889425","full_name":"dwqs/area-puppeteer","owner":"dwqs","description":"基于 puppeteer 的中国行政区域抓取爬虫","archived":false,"fork":false,"pushed_at":"2019-11-28T02:57:55.000Z","size":133,"stargazers_count":171,"open_issues_count":6,"forks_count":100,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-27T05:05:45.969Z","etag":null,"topics":["address","area","china","china-area","china-city","city","puppeteer"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dwqs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-17T10:45:20.000Z","updated_at":"2024-12-24T10:56:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae55bf08-ebbb-4a56-8b28-15a48752b0c0","html_url":"https://github.com/dwqs/area-puppeteer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwqs%2Farea-puppeteer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwqs%2Farea-puppeteer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwqs%2Farea-puppeteer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwqs%2Farea-puppeteer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwqs","download_url":"https://codeload.github.com/dwqs/area-puppeteer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232320251,"owners_count":18504974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address","area","china","china-area","china-city","city","puppeteer"],"created_at":"2024-08-04T21:00:16.147Z","updated_at":"2025-01-03T10:10:04.101Z","avatar_url":"https://github.com/dwqs.png","language":"JavaScript","funding_links":[],"categories":["Opensource projects"],"sub_categories":[],"readme":"[![build pass](https://api.travis-ci.org/dwqs/area-puppeteer.svg?branch=master)](https://travis-ci.org/dwqs/area-puppeteer?branch=master) ![license](https://img.shields.io/badge/license-WTFPL%20--%20Do%20What%20the%20Fuck%20You%20Want%20to%20Public%20License-green.svg)\n\n# area-puppeteer\n基于 puppeteer 的中国行政区域抓取爬虫\n\n## 数据来源\n* 国家统计局：[统计用区划代码和城乡划分代码](http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/2016/index.html)\n* 国家民政部：[中华人民共和国行政区划代码](http://www.mca.gov.cn/article/sj/tjbz/a/)\n\n## 数据更新\n\n```\ngit clone git@github.com:dwqs/area-puppeteer.git\nnpm i\nnpm start // 生成市县区数据\nnpm run format // 格式化数据\n```\n\n生成的数据包含两份：`cities.js` 和 `areas.js`，前者是市级数据，后者是县区数据\n\n格式化后会生成两份数据：`pca.js` 和 `pcaa.js`，前者仅省市数据，后者包含省市区数据\n\n```js\nimport Data from 'path/to/pcaa';\n\nData['86']\n// 所有省份：{'110000': '北京市', '120000': '天津市', '130000': '河北省', ...}\n\nData['130000']\n// 对应省份的所有城市：{'130100': '石家庄市', '130200': '唐山市', '130300': '秦皇岛市', ...}\n\nData['130200']\n// 对应市的所有县区：{'130201': '市辖区', '130202': '路南区', '130203': '路北区', ...}\n```\n\n## License\nThis repo is released under the [WTFPL](http://www.wtfpl.net/) – Do What the Fuck You Want to Public License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwqs%2Farea-puppeteer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwqs%2Farea-puppeteer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwqs%2Farea-puppeteer/lists"}