1688图片下载器

v1.0.0

从淘宝/1688下载商品图片。触发词:淘宝下载图片、1688下载图片、商品图片下载、淘宝主图、下载商品图、1688图片。支持通过商品名搜索或直接提供商品URL下载主图和详情图。

0· 331·1 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for gufusheng1994-dev/1688.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "1688图片下载器" (gufusheng1994-dev/1688) from ClawHub.
Skill page: https://clawhub.ai/gufusheng1994-dev/1688
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install 1688

ClawHub CLI

Package manager switcher

npx clawhub@latest install 1688
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the delivered artifacts: SKILL.md and the Python script both implement extracting image URLs from product pages and downloading them. No unrelated credentials, binaries, or installs are requested.
Instruction Scope
Instructions are focused on browsing the product page, snapshotting HTML, extracting image URLs, and downloading them — all within the stated purpose. The SKILL.md recommends using a browser tool with a profile (openclaw) and snapshot functionality; that is expected to circumvent anti-scraping, but it means the agent will access a browser profile (potentially containing cookies/session state).
Install Mechanism
No install spec; the skill is instruction + a small utility script using the requests library. Nothing is downloaded from untrusted URLs or installed system-wide.
Credentials
The skill requests no environment variables or secrets. However, it defaults to saving files under ~/.openclaw/sharespace and recommends opening the browser with a profile (openclaw). Those defaults can expose downloaded files to other agents/users or reuse existing browser sessions/cookies — proportionate to the task but worth awareness.
Persistence & Privilege
always is false and the skill does not request elevated or persistent platform privileges nor attempts to modify other skills or global agent configs.
Assessment
This skill appears to do what it says: open product pages, extract image URLs, and download them. Before installing or running: (1) be aware the SKILL.md tells the agent to open a browser profile (openclaw) — that may use existing cookies/login sessions; use a clean profile if you don't want to expose account sessions. (2) The default output is a shared path (~/.openclaw/sharespace/...); change it if you don't want images placed in a shared folder. (3) Review the Python script if you have concerns (it only uses requests to fetch image hosts and writes files locally). (4) Don't provide account credentials to the agent — the skill does not require them, though some pages may need login to view content. (5) Ensure you have the right to download the images (copyright/terms). If you want extra safety, run the script in an isolated environment and avoid reusing a browser profile that contains sensitive sessions.

Like a lobster shell, security has layers — review code before you run it.

latestvk97899mzsz1ec048dfpcr3t86d843vkc
331downloads
0stars
1versions
Updated 3w ago
v1.0.0
MIT-0

淘宝/1688 商品图片下载器

从淘宝、1688等电商平台下载商品图片到本地。

工作流程

方式一:通过商品URL下载

  1. 用户提供商品页面URL
  2. 使用浏览器打开页面
  3. 快照获取页面内容
  4. 提取图片URL
  5. 下载保存

方式二:通过商品名搜索下载

  1. 用户提供商品名称
  2. 使用浏览器搜索淘宝/1688
  3. 找到目标商品
  4. 进入商品详情页
  5. 提取并下载图片

使用方法

下载脚本

脚本位置: scripts/download_images.py

# 直接下载图片URL列表
python scripts/download_images.py --images /tmp/image_urls.txt --output ./商品图片

# 使用配置文件
python scripts/download_images.py --config /tmp/download_config.json

浏览器操作(推荐)

由于淘宝/1688有反爬机制,必须使用浏览器来访问和获取图片:

// 使用 browser 工具打开商品页面
browser open --url "商品URL" --profile openclaw

// 获取页面快照,提取图片URL
browser snapshot

// 从快照中识别图片元素,提取src或data-src

图片保存位置

  • 默认保存到: ~/.openclaw/sharespace/商品图片/{商品名}/
  • 主图命名: main_01.jpg, main_02.jpg, ...
  • 详情图命名: detail_01.jpg, detail_02.jpg, ...

执行步骤

当用户请求下载商品图片时:

  1. 确认信息

    • 商品URL 或 商品名称
    • 是否需要详情图(默认只下载主图)
    • 保存目录(默认共享文件夹)
  2. 打开浏览器

    browser open --url "<商品URL>" --profile openclaw
    
  3. 获取页面快照

    browser snapshot
    
  4. 提取图片URL(关键步骤)

    1688的图片URL格式:

    • 主图: https://cbu01.alicdn.com/img/ibank/O1CN01xxxxx_!!店铺ID-0-cib.jpg
    • 颜色图: 同上,在颜色选择区域
    • 详情图: 需要从页面script标签或data-src中提取

    正确提取方法:

    // 1. 获取所有img标签的src
    document.querySelectorAll('img').forEach(img => {
      const src = img.src;
      if (src.includes('cbu01.alicdn.com/img/ibank')) {
        images.push(src);
      }
    });
    
    // 2. 从script标签提取详情图(重要!)
    document.querySelectorAll('script').forEach(script => {
      const text = script.textContent;
      const matches = text.match(/https?:\/\/cbu01\.alicdn\.com\/img\/ibank[^"'\s]+/g);
      if (matches) detailImages.push(...matches);
    });
    

    URL处理:

    • 去掉 .webp 后缀获取原图
    • 去掉 220x220.jpg250x250.jpg310x310.jpg 等缩略图后缀
    • 详情图URL通常以 !!3827449935-0-cib.jpg 结尾
  5. 创建保存目录

    mkdir -p ~/.openclaw/sharespace/商品图片/{商品名}/{主图,颜色图,详情图}
    
  6. 下载图片

    • 使用 requests 下载,设置 Referer 头
    • 主图命名: main_01.jpg, main_02.jpg, ...
    • 颜色图命名: color_01.jpg, color_02.jpg, ...
    • 详情图命名: detail_01.jpg, detail_02.jpg, ...
  7. 报告结果

    • 下载成功数量
    • 每张图片的文件大小
    • 保存路径
    • 失败的图片(如有)

注意事项

  • 淘宝/1688 需要登录才能查看部分内容
  • 图片URL可能带有防盗链,需要设置 Referer
  • 部分图片是懒加载,需要滚动触发
  • 主图通常是 800x800 或更大的正方形图
  • 详情图可能是长图,需要特别处理

示例对话

用户: 帮我下载这个商品的图片 https://detail.1688.com/offer/123456.html

Agent:

  1. 打开浏览器访问该URL
  2. 获取页面快照
  3. 提取图片URL(找到5张主图,12张详情图)
  4. 创建目录并下载
  5. 报告: 已保存到 ~/.openclaw/sharespace/商品图片/商品名/

用户: 帮我在淘宝搜"无线蓝牙耳机"下载主图

Agent:

  1. 打开淘宝搜索页面
  2. 搜索"无线蓝牙耳机"
  3. 从搜索结果提取商品主图
  4. 下载保存

Comments

Loading comments...