gospider007 / gospider

🚀Gospider is a powerful Golang web crawler that includes all the necessary libraries for transitioning from Python to Golang. It provides a fast and seamless transition for Python web crawlers to Golang.
GNU Lesser General Public License v3.0
91 stars 22 forks source link

当ja3id指定为ja3.HelloAndroid_11_OkHttp会发生错误 #1

Closed Ecalose closed 1 year ago

Ecalose commented 1 year ago

代码如下:

package main

import (
    "context"
    "gitee.com/baixudong/gospider/ja3"
    "gitee.com/baixudong/gospider/requests"
    "log"
)

func main() {
    reqCli, err := requests.NewClient(context.TODO())
    if err != nil {
        log.Panic(err)
    }
    response, err := reqCli.Request(context.TODO(), "get", "https://tools.scrapfly.io/api/fp/ja3?extended=1", requests.RequestOption{Http2: true, Ja3Id: ja3.HelloAndroid_11_OkHttp})
    if err != nil {
        log.Panic(err)
    }
    log.Print(response.Text())
}

报错如下 2023/03/10 16:44:30 Get "https://tools.scrapfly.io/api/fp/ja3?extended=1": remote error: tls: protocol version not supported panic: Get "https://tools.scrapfly.io/api/fp/ja3?extended=1": remote error: tls: protocol version not supported 更换为其他的id则没问题

gospider007 commented 1 year ago

这是由于HelloAndroid_11_OkHttp 使用的tls 协议是1.2 ,而你测试的网站不支持tls 1.2 协议导致的

Ecalose commented 1 year ago

这是由于HelloAndroid_11_OkHttp 使用的tls 协议是1.2 ,而你测试的网站不支持tls 1.2 协议导致的

ok