[Crawler/Scraper for Golang]?A lightweight distributed friendly Golang crawler framework.一个轻量的分布式友好的 Golang 爬虫框架。
一个分布式友好的轻量的 Golang 爬虫框架。
!! Warning !!
Goribot 已经被迁移到 Gospider|github.com/zhshch2002/gospider。修复了一些调度问题并分离了网络请求部分到另一个仓库。此仓库会继续保留,建议新朋友使用新的 Gospider。
Goribot has been moved to Gospider|github.com/zhshch2002/gospider. Fixed some scheduling issues and separated the network request part to another repo. This repo will continue to be kept, suggest new friends to use the new Gospider.
版本警告
Goribot 仅支持 Go1.13 及以上版本。
go get -u github.com/zhshch2002/goribot
Goribot 包含一个历史开发版本,如果您需要使用过那个版本,请拉取 Tag 为 v0.0.1 版本。
package main
import (
"fmt"
"github.com/zhshch2002/goribot"
)
func main() {
s := goribot.NewSpider()
s.AddTask(
goribot.GetReq("https://httpbin.org/get"),
func(ctx *goribot.Context) {
fmt.Println(ctx.Resp.Text)
fmt.Println(ctx.Resp.Json("headers.User-Agent"))
},
)
s.Run()
}
至此你已经可以使用 Goribot 了。更多内容请从 开始使用 了解。
万分感谢以上项目的帮助?。