Skip to main content

Screenshot websites quickly

Project description

`mkscreenshot` takes screenshots of websites from the command line using selenium and PhantomJS.


## Installation

First, you need to install PhantomJS and ensure it's on your path.

You can do this by manually [downloading PhantomJS](phantom) from their website (all platforms); installing PhantomJS with Homebrew: `brew cask install phantomjs` (OS X); installing PhantomJS with npm: `npm install -g phantomjs` (all platforms); or using your system's package manager.

That's the hard part! Once that's done, installing `mkscreenshot` is as simple as:

```
pip3 install mkscreenshot
```

_Please note: `mkscreenshot` is only tested with Python 3.5 – you should be using Python 3!_


## Usage

```
Usage: mkscreenshot [OPTIONS] URL

Options:
--output TEXT Filename for the screenshot (defaults to the domain name)
--sleep INTEGER Wait before taking the screenshot to allow asynchronous
scripts to load
--width INTEGER Specify the width of the browser window
--help Show this message and exit.
```


For example, to take a screenshot of the [Hacker News](https://news.ycombinator.com) homepage:

```
> mkscreenshot https://news.ycombinator.com
```

And you'll get a screenshot like this:

![Hacker News](https://s3-ap-southeast-2.amazonaws.com/brntn/news.ycombinator.com-20160823-133356.png)


## License

`mkscreenshot` is licensed under the MIT License and I encourage you to remix it for your own purposes.

[phantom]: http://phantomjs.org/download.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkscreenshot-1.0.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page