Skip to content

Go package for capturing screenshots of websites in various resolutions

License

Notifications You must be signed in to change notification settings

frozzare/go-screenshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot Build Status GoDoc Go Report Card

Go package for capturing screenshots of websites in various resolutions. It uses phantomjs in the background.

Installation

First you will need to install phantomjs then you can run go get

go get github.com/frozzare/go-screenshot

Example

package main

import (
	"fmt"
	"log"

	"github.com/frozzare/go-screenshot"
)

func main() {
	s := screenshot.NewScreenshot(&screenshot.Options{
		URL: "https://google.com",
	})

	file, err := s.Save() // or s.Save("https://google.com")
	if err != nil {
		log.Fatal(err)
	}

	// Path to image.
	fmt.Println(file)
}

License

MIT © Fredrik Forsmo

About

Go package for capturing screenshots of websites in various resolutions

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages