Coder Social home page Coder Social logo

pyspider's Introduction

PySpider

This is the project of Spider of Sina and Zhihu based Python.(Maybe more channels latter!)

  • 注:该Project依赖于Python3.6

文件目录:

  • config.json: 设置文件,每个子内容包括五项

    {
        "banner": "该模块的名字,如'热搜榜'",
        "base_url": "抓取网站的链接",
        "outpath": "csv文件保存的路径",
        "frequency": "自动抓取的频率,以s为单位",
        "end_date": "自动抓取结束的时间",
        "number": "话题数量"
    }
  • SinaSpider.py:利用爬虫抓去新浪微博Sina Weibo的热搜榜的内容,每隔一定的时间自动抓取一次。

  • requirements.txt:运行所需要的依赖包

运行方法

首先,安装所需要的依赖包:

pip install -r requirements.txt

其次,修改config.json文件中所需要的设置,特别是*"outpath", "frequency", "end_date"。

最终,运行对应的.py文件

python SinaSpider.py

pyspider's People

Contributors

xuganchen 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.