Skip to content

Instantly share code, notes, and snippets.

@kkdai
Last active January 27, 2020 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkdai/02e2af4f586208ef1ee678e585a817cd to your computer and use it in GitHub Desktop.
Save kkdai/02e2af4f586208ef1ee678e585a817cd to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
)
func parseWebUrl(url string) {
doc, err = goquery.NewDocument(url)
if err != nil {
log.Fatal(err)
}
// 找出所有 class id 名稱為 `r-ent`
doc.Find(".r-ent").Each(func(i int, s *goquery.Selection) {
//卻無法成功進入..
////....
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment