Git Product home page Git Product logo

go-crawler's Introduction

crawler by Golang

依赖

  1. elastic v7 (https://github.com/olivere/elastic)
  2. golang.org/x (gopm get -g -v golang.org/x/text && gopm get -g -v golang.org/x/net)
  3. Elasticseach (使用 docker 运行,https://hub.docker.com/_/elasticsearch)

使用 elastic v7 的时候注意,可能会发生以下的问题 olivere/elastic#1098

我的解决方案是将 go upgrade to 1.13 就解决了这个问题,若有人可以明确知道是什么导致这个问题,可以留言哟

结构

  • crawler_distributed 分布式-RPC-实现代码

  • engine 定义是否单进程或者多携程进行爬取

  • fetch 获取网站的 HTML(定义 cookie 等信息)

  • model 定义需要保存到 ELasticSearch 的数据结构

  • persist 定义保存数据的 saver

  • scheduler 定义调度器,如队列等

  • site 爬取每个站点的页面爬取结构

go-crawler's People

Contributors

liam-pat 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.