Giter Site home page Giter Site logo

zhihuwebspider's Introduction

java webspider

技术选型

名称 版本
webmagic 0.5.2
spring boot 1.2.7.RELEASE
spring mvc 4.2.0.RC2
mybats 3.2.8
通用maper 3.3.0
百度echart 2.0
layer 2.1
bootstrap 3.0.3

启动方法

  • 爬虫都放在spider 包下,启动main方法就好
    • 需要使用Redis做队列,充当做调度器的功能 ,也可以修改Scheduler为FileCacheQueueScheduler,如
    (new FileCacheQueueScheduler("/usr/zhihu/cache"))
    
    • 使用mysql ,配置文件在db.properties
    • 爬取用户详细信息需要带上cookie,获取cookie 可以通过浏览器,也可以用我的SimulateLogin,获取之后修改spider site对象 中cookie的值
  • 启动web 则直接运行app 即可
  • 如果是在linux 下,则在配置好数据库的情况下,运行spider.sh 和app.sh 俩脚本就行

截图

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.