"github.com/PuerkitoBio/goquery"
func GetJokes() {
doc,err:=goquery.NewDocument("http://www.qiushibaike.com")
if err!=nil{
log.Fatal(err)
}
doc.Find(".content").Each(func(i int,s *goquery.Selection){
fmt.Println(s.Text())
})
}
func main(){
fmt.Println("hello world")
GetJokes()
}
can't load package: C:\Go\src\testapp\main.go:14:2: non-standard import "github.com/PuerkitoBio/goquery" in standard package "test"
有疑问加站长微信联系(非本文作者)