screenshotone-website-screenshot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ScreenshotOne Website Screenshot

ScreenshotOne 网站截图

Overview

概述

Use this skill to capture website screenshots through ScreenshotOne's HTTP API with
curl
.
Prefer direct
curl --get --data-urlencode
requests so the command is visible, easy to tweak, and easy to copy into GitHub examples.
使用本技能可通过
curl
调用ScreenshotOne的HTTP API来截取网站截图。
推荐直接使用
curl --get --data-urlencode
请求,这样命令可见、易于调整,也方便复制到GitHub示例中。

Quick Start

快速开始

Get your API key first:
  1. Go to https://screenshotone.com/.
  2. Sign up.
  3. Visit https://dash.screenshotone.com/access.
  4. Copy your
    access_key
    .
Set your API key first:
bash
export SCREENSHOTONE_ACCESS_KEY="your_access_key"
Take a basic screenshot:
bash
curl --fail --silent --show-error --location --get \
  --output "example.png" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  "https://api.screenshotone.com/take"
Take a full-page screenshot with a larger viewport:
bash
curl --fail --silent --show-error --location --get \
  --output "example-full-page.png" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  --data-urlencode "full_page=true" \
  --data-urlencode "viewport_width=1440" \
  --data-urlencode "viewport_height=2200" \
  "https://api.screenshotone.com/take"
Wait for content and hide UI noise before capture:
bash
curl --fail --silent --show-error --location --get \
  --output "example-clean.png" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  --data-urlencode "wait_until=networkidle" \
  --data-urlencode "delay=2" \
  --data-urlencode "block_cookie_banners=true" \
  --data-urlencode "hide_selectors=.chat-widget,.newsletter-modal" \
  "https://api.screenshotone.com/take"
首先获取你的API密钥:
  1. 访问 https://screenshotone.com/
  2. 注册账号
  3. 打开 https://dash.screenshotone.com/access
  4. 复制你的
    access_key
先设置你的API密钥:
bash
export SCREENSHOTONE_ACCESS_KEY="your_access_key"
截取基础截图:
bash
curl --fail --silent --show-error --location --get \
  --output "example.png" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  "https://api.screenshotone.com/take"
截取更大视口的整页截图:
bash
curl --fail --silent --show-error --location --get \
  --output "example-full-page.png" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  --data-urlencode "full_page=true" \
  --data-urlencode "viewport_width=1440" \
  --data-urlencode "viewport_height=2200" \
  "https://api.screenshotone.com/take"
截图前等待内容加载并隐藏UI冗余元素:
bash
curl --fail --silent --show-error --location --get \
  --output "example-clean.png" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  --data-urlencode "wait_until=networkidle" \
  --data-urlencode "delay=2" \
  --data-urlencode "block_cookie_banners=true" \
  --data-urlencode "hide_selectors=.chat-widget,.newsletter-modal" \
  "https://api.screenshotone.com/take"

Workflow

工作流

  1. Pick the target URL, output file, and
    format
    .
  2. Pass credentials through
    SCREENSHOTONE_ACCESS_KEY
    .
  3. Build the request with
    curl --get
    and repeated
    --data-urlencode "key=value"
    flags.
  4. When choosing options, read
    references/screenshotone-options.md
    first.
  5. Use only the access key flow in this skill. Do not add signed-request or secret-key handling.
  1. 选择目标URL、输出文件和
    format
  2. 通过
    SCREENSHOTONE_ACCESS_KEY
    传入凭证
  3. 使用
    curl --get
    和重复的
    --data-urlencode "key=value"
    参数构建请求
  4. 选择选项时,请先阅读
    references/screenshotone-options.md
  5. 本技能仅使用访问密钥流程,请勿添加签名请求或密钥处理逻辑

Command Template

命令模板

Use this pattern for most requests:
bash
curl --fail --silent --show-error --location --get \
  --output "<output-file>" \
  --data-urlencode "url=<target-url>" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  --data-urlencode "<option>=<value>" \
  "https://api.screenshotone.com/take"
大部分请求可使用如下模式:
bash
curl --fail --silent --show-error --location --get \
  --output "<output-file>" \
  --data-urlencode "url=<target-url>" \
  --data-urlencode "access_key=${SCREENSHOTONE_ACCESS_KEY}" \
  --data-urlencode "format=png" \
  --data-urlencode "<option>=<value>" \
  "https://api.screenshotone.com/take"

Option Selection

选项选择

Use these groups first:
  • Page size and coverage:
    full_page
    ,
    viewport_width
    ,
    viewport_height
    ,
    selector
  • Stability and timing:
    wait_until
    ,
    delay
    ,
    timeout
    ,
    wait_for_selector
  • Cleanup:
    block_cookie_banners
    ,
    block_ads
    ,
    hide_selectors
    ,
    styles
  • Output shaping:
    format
    ,
    image_quality
    ,
    image_width
    ,
    image_height
    ,
    omit_background
  • Request context:
    cookies
    ,
    headers
    ,
    authorization
    ,
    proxy
    ,
    user_agent
If a request needs less common parameters, look them up in
references/screenshotone-options.md
, then add them as another
--data-urlencode "key=value"
flag.
优先使用以下分组参数:
  • 页面尺寸与覆盖范围:
    full_page
    viewport_width
    viewport_height
    selector
  • 稳定性与计时:
    wait_until
    delay
    timeout
    wait_for_selector
  • 内容清理:
    block_cookie_banners
    block_ads
    hide_selectors
    styles
  • 输出调整:
    format
    image_quality
    image_width
    image_height
    omit_background
  • 请求上下文:
    cookies
    headers
    authorization
    proxy
    user_agent
如果请求需要使用更少见的参数,请在
references/screenshotone-options.md
中查找,然后将其作为额外的
--data-urlencode "key=value"
参数添加即可。

Resources

资源