Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrPhantomJSNotFound = "\"phantomjs\": executable file not found in $PATH" ErrFetcherJSNotFound = "cannot find ./phantomjs_fetcher.js or $GOPATH/github.com/src/nladuo/go-phantomjs-fetcher/phantomjs_fetcher.js" )
View Source
const ( RUN_AT_DOC_START = "document-start" RUN_AT_DOC_END = "document-end" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct { ProxyPort string AllowRedirects bool //phantomJSPid int //phantomJSHandlePtr uintptr DefaultOption *Option // contains filtered or unexported fields }
func (*Fetcher) GetWithOption ¶
func (this *Fetcher) GetWithOption(url, js_script, js_run_at string, option *Option) (*Response, error)
send httpGet request by phantomjs with the js_script and some option like headers
func (*Fetcher) ShutDownPhantomJSServer ¶
func (this *Fetcher) ShutDownPhantomJSServer()
shutdown the phantomjs server in windows or linux
Click to show internal directories.
Click to hide internal directories.