Skip to main content

Python API Client for Screenshotapi.io

Project description

# ScreenshotAPI.io Python Client

![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiVHpENmRNLzM5eDVGOUhSdmc5YXBpbURPQjMzMnRlSTBvVjRmbWUyalBDR3NCUWRsZ0RrZ25NTVQzSjhXaW0vaUMxRk55OVU1YjlXMmtuc2RMaXhWVjVvPSIsIml2UGFyYW1ldGVyU3BlYyI6IkNVTzZzNDhWdjhRcVRBTTMiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)

An API Client for ScreenshotAPI.io (www.screenshotapi.io)

Will perform a screenshot capture using ScreenshotAPI.io and store the resulting screenshot png file locally on disk given the path prefix specified in the `save_path` argument.

## Installation

```shell
pip install screenshotapi
```

## Usage
```python
import screenshotapi

screenshotapi.get_screenshot(
apikey='get your free apikey at www.screenshotapi.io',
capture_request = {
'url': 'http://www.amazon.com',
'viewport': '1200x800',
'fullpage': False,
'webdriver': 'firefox',
'javascript': True,
'fresh': False
},
save_path = './'
)
```

## Command Line Usage

The installer also provids a command line interface. You can use it as follows.

```shell
$ export SCREENSHOTAPI_KEY=your-key-goes-here
$ screenshotapi --url http://amazon.com \
--viewport 1200x800 \
--webdriver firefox \
--save-path ./
```

Note that you can provide a `SCREENSHOTAPI_KEY` environment variable that can then be used for subsequent calls, or you can use an `--apikey` argument on each call.

API Key
-------

To get a free API key, go to www.screenshotapi.io.

## License

MIT License

Copyright (c) 2018 Competitor Archive, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

screenshotapi-1.1.5.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file screenshotapi-1.1.5.tar.gz.

File metadata

File hashes

Hashes for screenshotapi-1.1.5.tar.gz
Algorithm Hash digest
SHA256 c3b69be9031c453d0b5ef7c1fab705cebb44ef75186a2b6d2cedceee2f202adb
MD5 6cb875fba562aebf9d0c5c71f6587349
BLAKE2b-256 53396c909d8d41d0299434e61c5a73c4b9bdfc4488ae0f16b5e0736482fbad94

See more details on using hashes here.

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