GithubHelp home page GithubHelp logo

baidu_qx's Introduction

百度迁徙python爬虫

爬取百度迁徙数据,分为3个类型:城市,省份,全国

问题描述:

使用python爬取百度迁徙平台:http://qianxi.baidu.com/ 中人口流动数据,根据所需类型取消注释相应代码即可。 爬取内容将会以 Excel文件形式 保存在代码根目录中的move_inmove_out文件夹

使用须知:

  1. 路径:使用前请修改绝对路径

  2. 日期:请在【migration_all_date】函数中修改日期(注意,左区间包含,右区间不包含)

  3. 城市区间:由于爬取的时候没有设置异步操作,所以一次性爬取城市过多的情况下会导致时间超时(time_out), 因此建议分区间爬取,可以复制多个源程序文件,同时开启多次不同区间的爬取

  4. 运行:确保上述信息无误之后直接运行main.py文件即可

所需的python包

  • requests
  • xlwt

已爬取的数据

baidu_qx's People

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.