An open API service indexing awesome lists of open source software.

https://github.com/abhinandan-khurana/go-screenshot-safari

This project provides a straightforward implementation of Selenium (in GoLang) with the Safari browser for capturing screenshots of web pages. It addresses the limitations posed by certain websites that require specific browsers, such as Chrome (version 96.0 or higher), Edge, or Safari, to function properly.
https://github.com/abhinandan-khurana/go-screenshot-safari

cli-tool cli-utility cybersecurity endpoint-security go golang screenshot-utility security-tools

Last synced: 25 days ago
JSON representation

This project provides a straightforward implementation of Selenium (in GoLang) with the Safari browser for capturing screenshots of web pages. It addresses the limitations posed by certain websites that require specific browsers, such as Chrome (version 96.0 or higher), Edge, or Safari, to function properly.

Awesome Lists containing this project

README

          

# go-screenshot-safari

## Description

This project provides a straightforward implementation of Selenium (in GoLang) with the Safari browser for capturing screenshots of web pages. It addresses the limitations posed by certain websites that require specific browsers, such as Chrome (version 96.0 or higher), Edge, or Safari, to function properly.

### Installation

```bash
go install -v github.com/Abhinandan-Khurana/go-screenshot-safari@v1.0.2
```

### Pre-requisites

Goto Safari > Develop > Developer Settings > Allow remote Automation (check this option)

And make sure to run [selenium server](https://selenium-release.storage.googleapis.com/index.html?path=3.5/) --> `java -jar selenium-server-standalone-3.5.3.jar`

## Usage

```bash

-interval_wait_time int
Time to wait between taking screenshots of URLs (in seconds) (default 1)
-load_wait_time int
Time to wait for a URL to load before taking a screenshot (in seconds) (default 2)
-output_dir string
The output directory to save screenshots (default "screenshots")
-urls_file string
Path to the file containing the list of URLs (default "urls.txt")
```

### Example usage

```bash
go run . -urls_file urls.txt -output_dir screenshots -load_wait_time 2 -interval_wait_time 1
```