Git Product home page Git Product logo

zhihu_topic's Introduction

知乎话题抓取

通过话题入口抓取话题下所有问题和回答

数据存储

MySQL: topic question answer

数据抓取

requwsts/xpath/re

配置

mac

cookie

解密chrome cookie文件

变更

知乎答案获取接口发生变化,之前是随意访问的get:
https://www.zhihu.com/api/v4/questions/{}/answers?sort_by=default&include={}&limit=20&offset={}
现在变成了post:
https://www.zhihu.com/node/QuestionAnswerListV2
Form Data:

  • method:next
  • params:{"url_token":36535039,"pagesize":10,"offset":30}

接口返回数据格式由原来的json数据变成了html,需要进一步xpath解析.
几个topic数据已在变化前全部抓下来了,后面会放到百度云上.

抓取结果

topic记录: 30
question记录: 8868
answer记录: 3145338
链接: https://pan.baidu.com/s/1slW6cSt 密码: 5fs4

建议

知乎有封禁策略,建议使用小号抓取

示例

topic save-to-screen

question save-to-screen

answer save-to-screen

zhihu_topic's People

Contributors

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