headzoo / surf

Stateful programmatic web browsing in Go.
MIT License
1.48k stars 159 forks source link

how can i use bow.CookieJar() map to array? #111

Open musicyin opened 5 years ago

musicyin commented 5 years ago

When i call bow.CookieJar() , it will return a map that have cookie domain, key , value, secure, httponly, expire, path. How can I convert the cookie jar to array? For example, array[0]['domain'] = "example.com" array[0]['httpOnly'] = False array[0]['name'] = "SameOfCookieKey" array[0]['value'] = "SameOfCookieValue" array[0]['path'] = "/" array[0]['expire'] = "123123213123" array[0]['secure'] = False

I knew that there is a bow.SiteCookies() function but it only return key and value. For some reason , I want to use all of these to addcookie on selenium and the website should work after that. Sorry for my bad english