Giter VIP home page Giter VIP logo

zhihu-club's Introduction

zhihu-club

一个爬知乎圈子的小爬虫

安装

pip3 install -r requirement.txt

配置

默认使用我的服务器上的数据库,如果你想更改成你的数据库(MySQL),请在/zhihu/zhihu/setting.py中进行如下修改

MYSQL_HOST=‘your_host’
MYSQL_DATABASE='your_database'
MYSQL_PORT=3306 # 默认端口号
MYSQL_USER='your_user'
MYSQL_PASSWORD='your_password' 

运行

下载项目解压并安装好依赖后

cd zhihu/
scrapy crawl zhihu-club 

爬虫运行结束,将爬到的数据从我的mysql数据库中导出为csv文件

cd .. # 进入zhihu-club这个主文件夹中 
python3 savedata.py # 若data中已存在目标文件.csv则需先把那个文件删除或者在savedata里修改要写入的文件名

zhihu-club's People

Stargazers

 avatar  avatar

Watchers

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