Versions in this module Expand all Collapse all v1 v1.3.0 Jul 1, 2019 v1.2.0 Mar 17, 2018 Changes in this version + const DefaultConnTimeout + const DefaultDialTimeout + const DefaultMethod + const DefaultRetryPause + const DefaultTryTimes + const Linux + const Macintosh + const PhomtomJsID + const SurfID + const Windows + var Database = UATable + var DefaultOSAttributes = map[int]OSAttributes + var UserAgents = map[string][]string + func AutoToUTF8(resp *http.Response) error + func BodyBytes(resp *http.Response) ([]byte, error) + func CreateDefault(browser string) string + func CreateReal() string + func CreateVersion(browser, version string) string + func DestroyJsFiles() + func Download(req *Request) (resp *http.Response, err error) + func Format(bname, bver string) string + func GetWDPath() string + func IsDirExists(path string) bool + func IsFileExists(path string) bool + func TopVersion(bname string) string + func UrlEncode(urlStr string) (*url.URL, error) + func WalkDir(targpath string, suffixes ...string) (dirlist []string) + type Bytes []byte + func (b Bytes) SetBody(r *Request) error + type Content struct + Bytes []byte + ContentType string + func (c *Content) SetBody(r *Request) error + type File struct + Bytes []byte + Filename string + type Form struct + Files map[string][]File + Values map[string][]string + func (f Form) SetBody(r *Request) error + type Formats map[string]string + type JSONObj struct + Data interface{} + func (obj *JSONObj) SetBody(r *Request) error + type OSAttributes struct + Comments []string + OSName string + OSVersion string + type Phantom struct + PhantomjsFile string + TempJsDir string + func (phantom *Phantom) DestroyJsFiles() + func (phantom *Phantom) Download(req *Request) (resp *http.Response, err error) + type Request struct + Body body + ConnTimeout time.Duration + DialTimeout time.Duration + DownloaderID int + EnableCookie bool + Header http.Header + Method string + Proxy string + RedirectTimes int + RetryPause time.Duration + TryTimes int + Url string + func (r *Request) ReadBody() (b []byte, err error) + type RespBody struct + func (b *RespBody) Read(p []byte) (int, error) + type Response struct + Body string + Cookies []string + type Surf struct + func (surf *Surf) Download(param *Request) (*http.Response, error) + type Surfer interface + Download func(*Request) (resp *http.Response, err error) + func New() Surfer + func NewPhantom(phantomjsFile, tempJsDir string) Surfer + type TemplateData struct + Coms string + Name string + OSN string + OSV string + Ver string + type UAData struct + DefaultOS int + Formats Formats + TopVersion string + type UATable map[string]UAData + type XMLObj struct + Data interface{} + func (obj *XMLObj) SetBody(r *Request) error