Giter VIP home page Giter VIP logo

zhihu-spider-python's Introduction

####Zhihu-Spider-Python
####简介 该项目能够抓取知乎相关信息,包括问题,答案和用户信息等。相当于一个用Python2构建的非官方API。

参阅了egrcczhihu-python,和7sDreamzhihu-py3两个项目。


####依赖: -[Beautiful Soup](http://www.crummy.com/software/BeautifulSoup/) -[requests](https://github.com/kennethreitz/requests)

requests和beautifulsoup4可以使用pip来安装:

pip install requests
pip install beautifulsoup4


在 Ubuntu 14.10 LTS 和 OS X10.11 环境下通过测试。 Windows下未测试,很可能会遇到编码问题。
#### 如何使用 注意,本项目并不提供一个"一篮子"程序,而只是提供一系列可调用的函数,需要爬取大量信息时,您需要自己写程序调用,然后运行。
#### 例子 简单概括,就是用链接构建对象,然后用方法获取数据。 目前支持问题(Question),回答(Answer),用户(User)三类对象。

例如获取一个问题下的数据:

from zhihu.question import Question

url = 'https://www.zhihu.com/question/40989110'
q = Question(question_url)

title = q.title()
topics = q.topics()
detail = q.detail()
...


#### 联系我 Email: [email protected]
#### No Way But the Hard Way ####

zhihu-spider-python's People

Contributors

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