feat: Update CycleTLS to v1.0.30 and adapt API usage
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"git.nite07.com/nite/go-flaresolverr"
|
||||
"github.com/Danny-Dasilva/CycleTLS/cycletls"
|
||||
)
|
||||
|
||||
func TestGetV1(t *testing.T) {
|
||||
@@ -44,6 +45,9 @@ func TestImitateGet(t *testing.T) {
|
||||
cookies := resp.Solution.Cookies
|
||||
resp1, err := f.SimulateGet("https://nopecha.com/demo/cloudflare", &flaresolverr.SimulateOptions{
|
||||
HttpCookies: cookies,
|
||||
Options: &cycletls.Options{
|
||||
ForceHTTP3: true,
|
||||
},
|
||||
}) // ImitateGet uses cookies to simulate browser requests and also simulates the browser's ja3 fingerprint.
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
@@ -51,6 +55,7 @@ func TestImitateGet(t *testing.T) {
|
||||
}
|
||||
if resp1.Status != 200 {
|
||||
fmt.Printf("status is not 200: %v", resp1.Status)
|
||||
fmt.Printf("%+v", resp1)
|
||||
t.FailNow()
|
||||
}
|
||||
jsonBytes, _ := json.Marshal(resp1)
|
||||
|
||||
Reference in New Issue
Block a user