GithubHelp home page GithubHelp logo

crismcn / weixinareadatacrawl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from houyhea/weixinareadatacrawl

0.0 1.0 0.0 88 KB

A javascript tool that can crawl Weichat area datas,including countries,provinces,cities.抓取微信国家、省市地区数据工具。

License: MIT License

JavaScript 100.00%

weixinareadatacrawl's Introduction

weixinAreaDataCrawl

A javascript tool that can crawl Weichat area datas,including countries,provinces,cities.抓取微信国家、省市地区数据工具。 截图

使用说明

  1. 首先,用自己的账号登录微信公众平台。然后打开开发者工具,并切换到consoletab;
  2. 将crawl.js的脚本内容拷贝到console的输入行;
  3. 修改传入的参数url为获取国家的ajax url。可以在network下找到类似https://mp.weixin.qq.com/cgi-bin/getregions的连接请求,复制过来即可;
  4. 然后回车运行,等待脚本执行到debugger处,在console处输入:JSON.stringify(countries),即可输出获取到的地区数据;
  5. 也可以继续执行完脚本,切换到element tab,在body的底部找到____crawllog 的div,找到最后一个p。但是本人亲测发现输出的字符串有截断。建议采用上一种断点获取方式。

其他

  1. 如果不想执行,也可以在data目录下找到现成的数据;city.js是包括国家、省份、城市的数据;province.js指包括国家、省份;
  2. 数据格式,顶部是一个国家数组,每一项有一个id、name、provinces数组,每一个province包含id、name、cities。每一个city包含id、name;

最后,拿走,不谢!

weixinareadatacrawl's People

Contributors

houyhea avatar

Watchers

James Cloos avatar

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.