Commit 9edcdaf1 authored by wang's avatar wang

cronet

parent 45277004
...@@ -50,11 +50,14 @@ func (c *Client) Start() error { ...@@ -50,11 +50,14 @@ func (c *Client) Start() error {
var cookies []*http.Cookie var cookies []*http.Cookie
cks := strings.Split(cookie, "; ") cks := strings.Split(cookie, "; ")
for _, ck := range cks { for _, ck := range cks {
t := strings.Split(strings.TrimSpace(ck), "=") if ck != "" {
cookies = append(cookies, &http.Cookie{ t := strings.Split(strings.TrimSpace(ck), "=")
Name: t[0], cookies = append(cookies, &http.Cookie{
Value: strings.ReplaceAll(strings.Join(t[1:], "="), ";", ""), Name: t[0],
}) Value: strings.ReplaceAll(strings.Join(t[1:], "="), ";", ""),
})
}
} }
c.Jar.SetCookies(uri, cookies) c.Jar.SetCookies(uri, cookies)
if err != nil { if err != nil {
...@@ -127,8 +130,8 @@ var chromes = []profiles.ClientProfile{ ...@@ -127,8 +130,8 @@ var chromes = []profiles.ClientProfile{
//profiles.Chrome_110, //profiles.Chrome_110,
//profiles.Chrome_107, //profiles.Chrome_107,
//profiles.Chrome_108, //profiles.Chrome_108,
//profiles.Chrome_117, profiles.Chrome_117,
profiles.Firefox_120, //profiles.Firefox_120,
//profiles.Safari_15_6_1, //profiles.Safari_15_6_1,
//profiles.Safari_16_0, //profiles.Safari_16_0,
//tls_client.Safari_Ipad_15_6, //tls_client.Safari_Ipad_15_6,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment