MechBoard/server/api/cmd/main.go

21 lines
470 B
Go

package main
import (
"fmt"
"log"
"moxitech/mechboard/api/internal/http"
"moxitech/mechboard/api/internal/parser"
)
func main() {
res, err := http.Get("https://www.selenium.dev/")
if err != nil {
log.Fatalf("ERROR GET DATA FROM LINK : %v", err)
}
result, err := parser.ParseHtml(res, "div.col-lg-4:nth-child(2) > div:nth-child(1) > div:nth-child(1)", "h4")
if err != nil {
log.Fatalf("ERROR GET DATA FROM LINK : %v", err)
}
fmt.Printf("%v\n", result)
}