sMap := make(map[string]string)
for _, cookie := range page.MustCookies() { //log.Printf("chrome cookie %d: %+v", i, cookie) sMap[cookie.Name] = cookie.Value } b, err := json.Marshal(sMap) if err != nil { fmt.Println("json.Marshal failed:", err) return nil } //log.Println(string(b))
标签:sMap,string,err,rod,cookie,go From: https://www.cnblogs.com/angdh/p/17117392.html