xinhua-resource-downloader
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "xinhua-resource-downloader" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-69861ee31925dfd84e979f9e13d95e6f85b07142d0002f3a75b12509c3b3549c. Verify the upstream source and version against https://skillhub.cn/skills/user_68ed9c94/xinhua-resource-downloader before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Xinhua AI editing convenience tool. Extracts all images, videos, and audio resources from the currently open browser page or a specified URL, downloads them in bulk to local storage in the selected format, and generates a visualized results report. Intended for scenarios such as downloading webpage resources, scraping webpage images/videos/audio, bulk downloading media files, and extracting webpage media.
Introduction source: third_party · user_68ed9c94 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: xinhua-resource-downloader
description: 新华AI编辑便捷工具-快速下载资源。从当前打开的浏览器页面或指定URL中提取所有图片、视频、音频资源,按选定格式批量下载到本地,并生成可视化结果报告。当用户提到下载网页资源、抓取网页图片视频音频、批量下载媒体文件、提取网页媒体等场景时触发此技能。
disable: falsexinhua-resource-downloader
这个 skill 的工作流分两步:
- Preflight(环境预检) — 在做任何下载前,先确保 Python 依赖、Playwright Chromium、ffmpeg 都就绪。
- Main workflow(主工作流) — 扫描 → 下载 → 生成报告。
每次任务开始时,先跑预检;如已就绪就跳过,缺什么就装什么。
Step 0 · Preflight 环境预检(每次任务必跑)
跨平台脚本会自动检测并安装所有依赖。运行:
python <skill_dir>/scripts/preflight_check.py
预检动作清单
| 顺序 | 检查项 | 检测方式 | 缺失时的动作 |
|---|---|---|---|
| 1 | Python ≥ 3.8 | sys.version_info |
直接报错退出,让用户升级 Python |
| 2 | playwright |
pip show |
pip install playwright |
| 3 | Pillow |
pip show |
pip install Pillow |
| 4 | requests |
pip show |
pip install requests |
| 5 | Playwright Chromium | playwright install chromium |
自动下载 Chromium 浏览器 |
| 6 | ffmpeg | where ffmpeg(Windows)/ which ffmpeg(Unix) |
按平台安装并配置 PATH |
ffmpeg 安装策略(按 OS 分支)
- Windows:从 BtbN GitHub Release 下载静态构建 zip,解压到
C:\ffmpeg\,然后用setx PATH "...;C:\ffmpeg\bin"永久写入用户 PATH。 - macOS:
brew install ffmpeg(检测到没装 Homebrew 时给出提示,不静默失败)。 - Linux (Debian/Ubuntu):
sudo apt-get update && sudo apt-get install -y ffmpeg。 - Linux (Fedora/RHEL):
sudo dnf install -y ffmpeg。 - Linux (CentOS/RHEL 旧版):
sudo yum install -y ffmpeg。
ffmpeg PATH 配置策略
- 优先
which ffmpeg/where ffmpeg,命中即完成。 - 未命中时扫描常见安装目录(
C:\ffmpeg\bin、C:\Program Files\ffmpeg\bin、/usr/local/bin、/opt/homebrew/bin等),找到则把 bin 目录加进用户 PATH。 - 仍找不到才触发平台对应的安装流程。
- Windows 用
setx写注册表用户环境变量;macOS / Linux 把export PATH=...:$PATH追加到~/.bashrc。
预检结果展示
脚本结束时输出表格化的检查报告(OK / FAIL / WARN),并在 PATH 变更后给出提示:
============================================================
Preflight Check Report
============================================================
[OK] Python 3.11.0
[OK] playwright 1.61.0 kept
[OK] Pillow 12.3.0 kept
[OK] requests 2.34.2 kept
[OK] chromium installed ensured
[OK] ffmpeg ffmpeg version 8.1 ... kept
path: D:\Program Files (x86)\ffmpeg\ffmpeg-8.1.2-essentials_build\bin\ffmpeg.exe
============================================================
如果只想看 JSON:
python <skill_dir>/scripts/preflight_check.py --json
跳过 ffmpeg 检测(已知不需要视频/音频转码时):
python <skill_dir>/scripts/preflight_check.py --skip-ffmpeg
Step 1 · 扫描页面资源
支持两种扫描模式:
1.1 连接当前已打开的浏览器(CDP 模式)
要求浏览器以远程调试模式启动:
# Chrome
chrome.exe --remote-debugging-port=9222
# Edge
msedge.exe --remote-debugging-port=9222
然后执行:
python <skill_dir>/scripts/scan_media.py --cdp --output media_list.json
脚本会扫描所有打开标签页中的 <img> / <video> / <audio> / <picture> / <source> / <a> 链接 / CSS 背景图等所有媒体资源。
1.2 扫描指定 URL
python <skill_dir>/scripts/scan_media.py --url "https://example.com" --output media_list.json
Step 2 · 批量下载并按格式保存
python <skill_dir>/scripts/download_media.py \
--input media_list.json \
--image-format jpg \
--video-format mp4 \
--audio-format mp3 \
--output download_results.json
支持的格式:
- 图片:
jpg/jpeg/png(用 Pillow 转换) - 视频:
mp4/mov(用 ffmpeg 转换) - 音频:
mp3/wav(用 ffmpeg 转换)
文件会保存到 ~/Desktop/download/<日期>抓取资源/{图片,视频,音频}/ 下,按标题或 URL hash 命名。
如果 ffmpeg 不可用,视频/音频会以原始格式保存,控制台会打印警告。
Step 3 · 生成可视化 HTML 报告
python <skill_dir>/scripts/generate_report.py \
--input download_results.json \
--output download_report.html
报告包含:总览统计、类型分布、文件夹路径、明细表格(编号 / 类型 / 标题 / 文件名 / 大小 / 状态 / 错误)。
完整一次性命令(main workflow)
把扫描、下载、报告三步串起来:
# 1. 预检
python <skill_dir>/scripts/preflight_check.py
# 2. 扫描
python <skill_dir>/scripts/scan_media.py --cdp --output media_list.json
# 或者:--url "https://example.com"
# 3. 下载
python <skill_dir>/scripts/download_media.py \
--input media_list.json \
--image-format jpg \
--video-format mp4 \
--audio-format mp3 \
--output download_results.json
# 4. 报告
python <skill_dir>/scripts/generate_report.py \
--input download_results.json \
--output download_report.html
使用前提
首次使用前会自动安装依赖(preflight 阶段会处理):
pip install playwright Pillow requests
playwright install chromium
ffmpeg(可选,用于视频/音频转码):从 https://ffmpeg.org/download.html 下载,或由预检脚本自动安装并配置 PATH。
已交付文件包括打包的 zip 文件和全部源码,可直接安装使用。
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供网页图片、视频、音频资源的批量下载与格式转换功能,满足编辑和内容采集的高频需求
- 支持 CDP 模式和指定 URL 两种扫描方式,适用场景广泛
- 自动生成可视化 HTML 报告,提升结果可读性
Highlights
- 触发词覆盖全面,包括'下载网页资源'、'抓取网页图片视频音频'、'批量下载媒体文件'等变体
- 边界清晰,不易与其他 Skill 混淆
Areas to improve
-
缺少 When to Use 显式章节 Reported severity: Minor
文档结构良好但未设置独立的'When to Use'使用场景说明章节
Recommendation: 建议在 Step 0 前增加'When to Use'章节,明确说明适用场景和使用前提
Highlights
- 采用 Preflight + Main workflow 两阶段结构,逻辑清晰
- 提供完整的一次性命令示例,便于用户快速执行
- frontmatter 完整,禁用状态明确
Highlights
- preflight 脚本自动化检测并安装所有依赖,降低用户配置门槛
- ffmpeg 支持多平台安装策略和 PATH 自动配置,兼容性良好
- 视频/音频转码失败时有降级机制,保证核心功能可用
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 31, 32, 33, 40, 41 -
Administrator or elevated privileges
Elevate only when necessary. Keep protection and certificate validation enabled and avoid broad system access.
Mentioned in main document · lines 41, 42, 43
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- example.com
- ffmpeg.org
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.