go-flaresolverr is Golang client for FlareSolverr v3.
- Install FlareSolverr
- Get go-flaresolverr
go get github.com/astrocode-id/go-flaresolverr
Retrieves webpage using request.get
command.
package main
import (
"fmt"
"log"
"github.com/PuerkitoBio/goquery"
"github.com/astrocode-id/go-flaresolverr"
)
func main() {
c, err := flaresolverr.NewClient(flaresolverr.Config{
BaseURL: baseURL,
})
if err != nil {
log.Fatal(err)
}
b, err := c.Get(flaresolverr.GetParams{
URL: "https://ifconfig.me",
})
if err != nil {
log.Fatal(err)
}
doc, err := goquery.NewDocumentFromReader(bytes.NewReader(b))
if err != nil {
log.Fatal(err)
}
ipAddress := doc.Find("strong").First().Text()
fmt.Println(ipAddress)
}
Retrieves webpage using request.post
command.
TODO
⚠️ Currently, FlareSolverr v3 doesn't supportsession
andproxy
. For more detail, see ChangeLog.