V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
zhshch

Goribot - 简洁的 Golang 爬虫框架

  •  
  •   zhshch · Oct 2, 2019 · 6006 views
    This topic created in 2402 days ago, the information mentioned may be changed or developed.

    https://github.com/zhshch2002/goribot

    B 站视频爬虫栗子

    一个简单的栗子:

    package main
    
    import (
        "fmt"
        "github.com/zhshch2002/goribot"
    )
    
    func main() {
        s := goribot.NewSpider()
        s.NewTask(
            goribot.MustNewGetReq("https://httpbin.org/get?Goribot%20test=hello%20world"),
            func(ctx *goribot.Context) {
                fmt.Println("got resp data", ctx.Text)
            })
        s.Run()
    }
    
    3 replies    2019-10-09 10:44:23 +08:00
    electronic
        1
    electronic  
       Oct 6, 2019 via Android
    支持
    zhshch
        2
    zhshch  
    OP
       Oct 8, 2019 via Android
    @electronic thx

    好几个收藏 1 个回复😂
    ango
        3
    ango  
       Oct 9, 2019
    关注一下~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1015 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 18:29 · PVG 02:29 · LAX 11:29 · JFK 14:29
    ♥ Do have faith in what you're doing.