Giter Club home page Giter Club logo

direct_web_spider's Introduction

direct_web_spider

direct_web_spider is direct web spider framwork for ruby.

Requirements

  • Ruby1.9.2+
  • sudo apt-get install libcurl4-gnutls-dev
  • bundle install

Features

  • 将定向爬取网站抽象成几个独立的过程(Fetcher, Paginater, Digger, Parser)
  • 封装爬取所需的通用功能,让开发者只需关心网页信息抽取逻辑
  • 编码处理模块
  • 日志模块,方便调试和错误跟踪
  • 多种下载接口(单线程、多线程、Event IO),并可以随时切换
  • 简单图片识别功能(针对电子商务网站价格信息为图片的情况)

Run

  • 运行顺序
    1. ruby script/run_fetcher
    2. ruby script/run_paginater
    3. ruby script/run_digger
    4. ruby script/run_parser
  • 启动参数: ruby script/run_parser -eproduction -dty -sdangdang -n500
    • -e指定环境(production/development)默认为development.
    • -d为以什么方式下载(ty->多线程,normal ->单线程, em -> EventIO)默认为normal,推荐使用ty参数
    • -s为指定运行哪个网站(dangdang,jingdong,etc)默认是当当
    • -n为指定一次爬取多少条记录,默认1000
    • -h为帮助信息

direct_web_spider's People

Contributors

hooopo avatar

Watchers

 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.