Update scraper.go
This commit is contained in:
@@ -6,6 +6,13 @@ import (
|
|||||||
"golang.org/x/net/html"
|
"golang.org/x/net/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func Must[T any](v T, err error) T {
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
type crawlFunc func(*html.Node)
|
type crawlFunc func(*html.Node)
|
||||||
|
|
||||||
func SearchElem(n *html.Node, data string) chan *html.Node {
|
func SearchElem(n *html.Node, data string) chan *html.Node {
|
||||||
|
|||||||
Reference in New Issue
Block a user