GOPA

用 Golang 编写的易于使用的蜘蛛程序。(之前名为 GOPA)。�「🕷️ An easy-to-use spider written in Golang. (previous named GOPA.)」

Github星跟踪图

GOPA, A Spider Written in Go.

Travis
Go Report Card
Join the chat at https://gitter.im/infinitbyte/gopa

Goal

  • Light weight, low footprint, memory requirement should < 100MB
  • Easy to deploy, no runtime or dependency required
  • Easy to use, no programming or scripts ability needed, out of box features

Screenshoot


How to use

Requirements

  • Elasticsearch v5.3+

Setup

First of all, get it, two opinions: download the pre-built package or compile it yourself.

Download Pre Built Package

Go to Release page, download the right package for your platform.

Note: Darwin is for Mac

Compile The Package Manually

Requirements

  • Golang 1.9+

Supported platform

For example:

#apt  install golang-go
#brew install golang
mkdir ~/go/src/github.com/infinitbyte/ -p
cd ~/go/src/github.com/infinitbyte/
git clone https://github.com/infinitbyte/gopa.git
cd gopa
make

After a few minutes, you should have:

gopa, the main program, a single binary.
gopa.yml, main configuration for gopa.

Required Config

Note: Elasticsearch version should >= v5.3

  • Enable elastic module in gopa.yml, update the elasticsearch's setting:
elasticsearch:
- name: default
  enabled: true
  endpoint: http://localhost:9200
  index_prefix: gopa-
  basic_auth:
    username: elastic
    password: changeme

Start

Besides Elasticsearch, Gopa doesn't require any other dependencies, just simply run ./gopa to start the program.

Gopa can be run as daemon(Note: Only available on Linux and Mac):

[10-21 16:01:09] [INF] [instance.go:23] workspace: data/gopa/nodes/0
[gopa] started.

Also run ./gopa -h to get the full list of command line options.

Usage of ./bin/gopa:
-config string
the location of config file (default "gopa.yml")
-cpuprofile string
write cpu profile to this file
-daemon
run in background as daemon
-debug
run in debug mode, gopa will quit with panic error
-log string
the log level,options:trace,debug,info,warn,error (default "info")
-log_path string
the log path (default "log")
-memprofile string
write memory profile to this file
-pidfile string
pidfile path (only for daemon)
-pprof string
enable and setup pprof/expvar service, eg: localhost:6060 , the endpoint will be: http://localhost:6060/debug/pprof/ and http://localhost:6060/debug/vars

Stop

It's safety to press ctrl+c stop the current running Gopa, Gopa will handle the rest,saving the checkpoint,
you may restore the job later, the world is still in your hand.

If you are running Gopa as daemon, you may stop it like this:

 kill -QUIT `pgrep gopa`

Configuration

UI

  • Search Console http://127.0.0.1:9000/
  • Admin Console http://127.0.0.1:9000/admin/

API

Architecture

Who uses it?

You use GOPA and you want to be listed there? Contact me.

License

Released under the Apache License, Version 2.0 .

主要指标

概览
名称与所有者infinilabs/crawler
主编程语言Go
编程语言Makefile (语言数: 6)
平台
许可证Other
所有者活动
创建于2017-07-05 07:45:39
推送于2021-05-19 08:41:59
最后一次提交2021-05-19 16:41:59
发布数11
最新版本名称v0.12.0_SNAPSHOT (发布于 )
第一版名称v0.1 (发布于 )
用户参与
星数308
关注者数25
派生数82
提交数789
已启用问题?
问题数32
打开的问题数9
拉请求数17
打开的拉请求数0
关闭的拉请求数4
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?