Skip to content

cxl008/ants-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ants-go

open source, restful, distributed crawler engine

why

I wrote a crawler engine named ants in python base on scrapy. But sometimes, dynamic language is chaos. So I start to write it in a compile language.

gopath

export GOPATH=PATH/TO/ants-go

requirement

go get github.com/PuerkitoBio/goquery
go get github.com/go-sql-driver/mysql

install

go install src/ants/ants/ants.go

run

cd bin
./ants

cluster in one computer

to test cluster in one computer,you can run it from different port in different terminal

one node,use the default port tcp 8300 http 8200

cd bin
./ants

the other node set tcp port and http port

cd bin
./ants -tcp 9300 -http 9200

flags

there are some flags you can set,check out the help message

./ants -h
./ants -help

Customize spider

  1. go to src/spiders
  2. write your spiders follow the example deap_loop_spider.go or go to the spider page
  3. add you spider to spiderMap,follow the example in LoadAllSpiders in load_all_spider.go
  4. install again

About

open source, distributed, restful crawler engine

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%