Git Product home page Git Product logo

gov_grabber's Introduction

Gov grabber

撰写目的说明

本程序特为本人正在进行社会学研究的朋友撰写。考虑到人工重复机械下载繁琐耗时,因此撰写一个简单爬虫用于批量下载。本项目可以下载国内各县的财政数据。

用法

第一次运行

本程序依赖于python运行,对于任何需要使用本程序的用户,需要安装python和一些对应包。 使用分为以下几步:

  1. 使用终端,切换至当前工作目录。(在终端中输入 cd 当前目录位置即可) 例: cd D:\gov_grabber

  2. 填写 xlsx表格

    结构为省、市、县、对应目录,备注。

    其中目录中各条目对应带有附件的单独新页面。可于本项目data.xlsx进一步查看。

  3. 安装python和其对应包。 首先你需要安装python。 其次你需要安装 pandas, chardet, requests 。在终端中输入 pip install pandas chardet, requests 即可

  4. 在终端中输入 python main.py 即可

后续使用

对于后续使用,仅需要更新data.xlsx后在在终端中输入 python main.py 即可。程序会跳过已经下载的文件(仍会打印下载信息)。

gov_grabber's People

Contributors

frinkleko avatar

Stargazers

 avatar  avatar

Watchers

 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.