summaryrefslogtreecommitdiff
path: root/modules/cookies
diff options
context:
space:
mode:
Diffstat (limited to 'modules/cookies')
-rw-r--r--modules/cookies/cookies.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/cookies/cookies.go b/modules/cookies/cookies.go
index 2f57a3f..2af2a27 100644
--- a/modules/cookies/cookies.go
+++ b/modules/cookies/cookies.go
@@ -51,6 +51,10 @@ func (m Module) AdaptTransport(t http.RoundTripper) http.RoundTripper {
return flyscrape.RoundTripFunc(func(r *http.Request) (*http.Response, error) {
for _, store := range stores {
for _, cookie := range store.Cookies(r.URL) {
+ // Unquote cookie value
+ if len(cookie.Value) >= 2 && cookie.Value[0] == '"' && cookie.Value[len(cookie.Value)-1] == '"' {
+ cookie.Value = cookie.Value[1 : len(cookie.Value)-2]
+ }
r.AddCookie(cookie)
}
}