package main import ( "github.com/gocolly/colly" "log" ) func main() { // 初始化Collector c := colly.NewCollector() // 当匹配到HTML标签时触发 c.OnHTML("style", func(e *colly.HTMLElement) { log.Println("style:", e.Text) }) // 访问网站 err := c.Visit("https://rank.opencompass.org.cn/leaderboard-multimodal/?m=REALTIME") if err != nil { log.Fatal(err) } }