Python语言的Screenshot API客户端库。
项目描述
概述
Python语言的Screenshot API客户端库。
最低Python版本为3.6。
安装
pip install screenshot-api
示例
完整的API文档可在此处找到
创建新的客户端
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
)
变更日志
1.0.0 (2021-12-16)
首次发布
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分发
screenshot-api-1.0.0.tar.gz (11.6 kB 查看散列)
构建分发版
screenshot_api-1.0.0-py3-none-any.whl (11.7 kB 查看哈希值)