The client library for Screenshot API in Python language.
The minimum Python version is 3.6.
pip install screenshot-api
Full API documentation available here
from screenshotapi import *
client = Client('Your API key')
client.get(filename='screen.jpg',url='example.com')
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
)