mirror of
https://gitgud.io/yats/libkiwi.git
synced 2026-06-23 03:25:22 -04:00
refactoring
This commit is contained in:
+2
-4
@@ -13,13 +13,11 @@ import (
|
||||
gq "github.com/PuerkitoBio/goquery"
|
||||
)
|
||||
|
||||
const _USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
|
||||
|
||||
type KF struct {
|
||||
client http.Client
|
||||
domain *url.URL
|
||||
|
||||
Cookies jar
|
||||
Cookies cookieJar
|
||||
}
|
||||
|
||||
// Supply your own http.Client to route through any proxies.
|
||||
@@ -41,7 +39,7 @@ func NewKF(hc http.Client, host *url.URL) (KF, error) {
|
||||
return KF{
|
||||
client: hc,
|
||||
domain: u,
|
||||
Cookies: jar{hc.Jar},
|
||||
Cookies: cookieJar{&hc.Jar},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user