Skip to main content

Python client library for Screenshot API.

Project description

screenshot-py license screenshot-py release screenshot-py build

Overview

The client library for Screenshot API in Python language.

The minimum Python version is 3.6.

Installation

pip install screenshot-api

Examples

Full API documentation available here

Create a new client

from screenshotapi import *

client = Client('Your API key')

Capture screenshots

client.get(filename='screen.jpg',url='example.com')

Extras

cookies = {
    'name1': 'value1',
    'name2': 'value2'
}

# Pass cookies, emulate mobile device, disable JS, wait for network idle
# event, output API errors in XML, capture PDF screenshot in full page
# mode and get image data in base64.
response = client.get_raw(
    url='example.com',
    type=ImageFormat.PDF,
    mode=Client.SLOW_MODE,
    full_page=True,
    mobile=True,
    output_format=Client.XML_FORMAT,
    image_output_format=Client.BASE64_FORMAT,
    no_js=True,
    cookies=cookies
)

Changelog

1.0.0 (2021-12-16)

  • First release

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

screenshot-api-1.0.0.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

screenshot_api-1.0.0-py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 3

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