Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteZeroLengthFiles ¶
func DeleteZeroLengthFiles(dir string)
DeleteZeroLengthFiles deletes zero length files from a specified dir
func GetShots ¶
func GetShots(urls []string, params Parameters)
GetShots starts pageres process itself and returns URL if Pageres Couldn't load url. Empty string is returned overwise
Types ¶
type Parameters ¶
type Parameters struct {
Command string
Sizes string //Use a <width>x<height> notation or a keyword.
Crop bool //Crop to the set height. add --crop to args if set to true
Scale string //Scale webpage n times.
Timeout string //Number of seconds after which PhantomJS aborts the request.
Filename string //Define a customized filename. For example <%= date %> - <%= url %>-<%= size %><%= crop %>.
UserAgent string //Custom user agent.
Format string //Image format: png or jpg
Overwrite bool //Will overwrite existing screenshot file if set to true
}
Parameters struct serves for passing parameters for pageres Read more information about parameters at https://github.com/sindresorhus/pageres
Click to show internal directories.
Click to hide internal directories.