GithubHelp home page GithubHelp logo

Comments (6)

YumeMichi avatar YumeMichi commented on May 7, 2024

看了一下提交记录应该是这里过滤了。
https://github.com/modood/Administrative-divisions-of-China/blob/master/lib/worker.js#L131-L137

from administrative-divisions-of-china.

YumeMichi avatar YumeMichi commented on May 7, 2024

我自己fork了一份仅作为自己的特殊需要

from administrative-divisions-of-china.

modood avatar modood commented on May 7, 2024

@YumeMichi 你好,因为这里市辖区不属于具体的某个区,所以特意过滤掉了。所以像你说的可以 fork 一份根据具体需求进行修改。

from administrative-divisions-of-china.

huangzhuohua avatar huangzhuohua commented on May 7, 2024

@YumeMichi 你好,因为这里市辖区不属于具体的某个区,所以特意过滤掉了。所以像你说的可以 fork 一份根据具体需求进行修改。

我觉得不应该过滤掉,因为统计局网站上是没有过滤的,是平级的,要保留才完整。

from administrative-divisions-of-china.

modood avatar modood commented on May 7, 2024

“市辖区”无法明确到具体哪个区。“市辖区”的概念类似于“县级市”、“县”等县级行政区,是一种统称。

截至 2018 年 9 月 20 日,**(含香港、澳门特别行政区,不含**省,内地 970 个市辖区)共计 996 个市辖区。
例如河北省一共设立了 47 个市辖区,其中石家庄市下有 8 个,分别是:
长安区、桥西区、新华区、井陉矿区、裕华区、藁城区、鹿泉区、栾城区
他们都属于市辖区。

如果有特殊需要需要保留,可以 fork 本项目将过滤去掉即可。
@huageorg

from administrative-divisions-of-china.

snakejordan avatar snakejordan commented on May 7, 2024

fork 了项目,发现大量没有市辖区并不是过滤掉的问题。
例如2018年版本的安徽省,下级所有的市都是有市辖区的,例如合肥市

代码里面发现因为这些市辖区并非是有下级超链接的,所以在crawler.js里面的正则表达式匹配就不能匹配到。

合肥市页面源码:
image

crawler.js源码:
image

由于对 NodeJS 和正则都不是很拿手,所以想请教如何能做到在这段“地级、县级、乡级”的正则里面包括漏掉的市辖区信息?

from administrative-divisions-of-china.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.