gheadless

package
v0.0.0-...-f3abbe6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScreenShot

func ScreenShot(urlStr, path string) error

func ScreenshotPhantomJS

func ScreenshotPhantomJS(urlStr, path string) error

Types

type Chrome

type Chrome struct {
	Resolution       string
	ChromeTimeout    int
	ChromeTimeBudget int
	Path             string
	UserAgent        string
	Argvs            []string

	ScreenshotPath string
}

Chrome contains information about a Google Chrome instance, with methods to run on it.

func New

func New() *Chrome

func (*Chrome) ScreenshotURL

func (chrome *Chrome) ScreenshotURL(targetURL *url.URL, destination string) error

ScreenshotURL takes a screenshot of a URL

func (*Chrome) SetScreenshotPath

func (chrome *Chrome) SetScreenshotPath(p string) error

SetScreenshotPath sets the path for screenshots

func (*Chrome) Setup

func (chrome *Chrome) Setup()

Setup configures a Chrome struct with the path specified to what is available on this system.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL