errnair / ScreenyPy

A CLI tool to take websites' screenshots. Take screenshots from multiple geographical locations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScreenyPy - A command-line tool to take screenshots of websites from different geographical locations.

What?

Name: Screenypy
Description: A python-based command-line tool that takes screenshots of websites/URLs from different geographical location using publicly available proxy servers.

Why?

This tool provides a really quick, easy and efficient way to chck the status of websites, to check if they're online and accessible from various geographical locations, by taking screenshots of the website/URL from the command-line interface. The script currently takes screenshots using Chromium and Firefox.

Requirements

Usage

Install all the prerequisites:

$ python3 -m pip install -r requirements.txt
$ sudo ./install.sh

A note on the prerequisites - The install script, install.sh installs Chromium, Firefox, chromedriver and geckodriver. Mismatches in compatible versions may occur between Chromium and chromedriver, causing the script to fail when taking screenshots using Chromium. For optimal results, make sure that the Chromium and chromedriver versions are compatible. For example, chromedriver v.2.35 is not compatible with Chromium 61.0.3163.100 - this version of Chromium requires chromedriver v.2.33.

Options

$ python screeny.py --help

usage: screeny.py [-h] [-c [CHROME]] [-f [FIREFOX]]

screenypy - A python script that generates screenshots of a website from
various random locations.

optional arguments:
  -h, --help            show this help message and exit
  -c [CHROME], --chrome [CHROME]
                        Generates screenshots using Chromium
  -f [FIREFOX], --firefox [FIREFOX]
                        Generates screenshots using Mozilla Firefox

a. To generate a screenshot using Chromium:

$ python screeny.py -c

The website will be test from the following IPs:

200.223.197.74:8080
187.53.62.82:80
201.183.227.197:8080

Browser selected: Chromium
Generating screenshots using Chromium


--- screenshot 200.223.197.74_chromium1.png generated in 0.7663443088531494 seconds ---
--- screenshot 187.53.62.82_chromium2.png generated in 18.873610734939575 seconds ---
--- screenshot 201.183.227.197_chromium3.png generated in 2.50515151023865 seconds ---

b. To generate a screenshot using Firefox:

$ python screeny.py -f

The website will be test from the following IPs:

199.7.220.121:8080
85.10.236.172:1080
209.126.124.73:9283

Browser selected: Firefox
Generating screenshots using Firefox


--- screenshot 199.7.220.121_firefox1.png generated in 3.5610098838806152 seconds ---
--- screenshot 85.10.236.172_firefox2.png generated in 3.918879747390747 seconds ---
--- screenshot 209.126.124.73_firefox3.png generated in 3.439244270324707 seconds ---

TODO:

  • Tests
  • User-Input validation.
  • A more reliable source of proxies.

About

A CLI tool to take websites' screenshots. Take screenshots from multiple geographical locations.


Languages

Language:Python 74.2%Language:Shell 25.8%