Documentation
¶
Index ¶
- Constants
- func AutoToUTF8(resp *http.Response) error
- func BodyBytes(resp *http.Response) ([]byte, error)
- func DestroyJsFiles()
- func Download(req Request) (resp *http.Response, err error)
- func GetWDPath() string
- func IsDirExists(path string) bool
- func IsFileExists(path string) bool
- func UrlEncode(urlStr string) (*url.URL, error)
- func WalkDir(targpath string, suffixes ...string) (dirlist []string)
- type Body
- type Cookie
- type DefaultRequest
- func (self *DefaultRequest) GetConnTimeout() time.Duration
- func (self *DefaultRequest) GetDialTimeout() time.Duration
- func (self *DefaultRequest) GetDownloaderID() int
- func (self *DefaultRequest) GetEnableCookie() bool
- func (self *DefaultRequest) GetHeader() http.Header
- func (self *DefaultRequest) GetMethod() string
- func (self *DefaultRequest) GetPostData() string
- func (self *DefaultRequest) GetProxy() string
- func (self *DefaultRequest) GetRedirectTimes() int
- func (self *DefaultRequest) GetRetryPause() time.Duration
- func (self *DefaultRequest) GetTryTimes() int
- func (self *DefaultRequest) GetUrl() string
- type DnsCache
- type Param
- type Phantom
- type Request
- type Response
- type Surf
- type Surfer
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func AutoToUTF8 ¶
func DestroyJsFiles ¶
func DestroyJsFiles()
func IsDirExists ¶
func IsFileExists ¶
Types ¶
type DefaultRequest ¶
type DefaultRequest struct { Url string Method string Header http.Header EnableCookie bool PostData string DialTimeout time.Duration ConnTimeout time.Duration TryTimes int RetryPause time.Duration RedirectTimes int Proxy string DownloaderID int // contains filtered or unexported fields }
func (*DefaultRequest) GetConnTimeout ¶
func (self *DefaultRequest) GetConnTimeout() time.Duration
func (*DefaultRequest) GetDialTimeout ¶
func (self *DefaultRequest) GetDialTimeout() time.Duration
func (*DefaultRequest) GetDownloaderID ¶
func (self *DefaultRequest) GetDownloaderID() int
func (*DefaultRequest) GetEnableCookie ¶
func (self *DefaultRequest) GetEnableCookie() bool
func (*DefaultRequest) GetHeader ¶
func (self *DefaultRequest) GetHeader() http.Header
func (*DefaultRequest) GetMethod ¶
func (self *DefaultRequest) GetMethod() string
func (*DefaultRequest) GetPostData ¶
func (self *DefaultRequest) GetPostData() string
func (*DefaultRequest) GetProxy ¶
func (self *DefaultRequest) GetProxy() string
func (*DefaultRequest) GetRedirectTimes ¶
func (self *DefaultRequest) GetRedirectTimes() int
func (*DefaultRequest) GetRetryPause ¶
func (self *DefaultRequest) GetRetryPause() time.Duration
func (*DefaultRequest) GetTryTimes ¶
func (self *DefaultRequest) GetTryTimes() int
func (*DefaultRequest) GetUrl ¶
func (self *DefaultRequest) GetUrl() string
type Phantom ¶
type Phantom struct { PhantomjsFile string TempJsDir string CookieJar *cookiejar.Jar // contains filtered or unexported fields }
func (*Phantom) DestroyJsFiles ¶
func (self *Phantom) DestroyJsFiles()
type Request ¶
type Request interface { GetUrl() string GetMethod() string GetPostData() string GetHeader() http.Header GetEnableCookie() bool GetDialTimeout() time.Duration GetConnTimeout() time.Duration GetTryTimes() int GetRetryPause() time.Duration GetProxy() string GetRedirectTimes() int GetDownloaderID() int }
Click to show internal directories.
Click to hide internal directories.