Install
$ agentstack add skill-linshidream-skill-hub-mafengwo-original-images ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
马蜂窝原图下载
目标
当用户提供马蜂窝图片页、游记页或类似页面,并要求下载网页图片时,使用本 skill 提取原始图片链接、去掉缩略图参数、下载原图,并导出:
original_image_links.txt
images/
summary.json
original_image_links.txt 必须使用以下格式,每行一个原图链接和文件大小,逗号拼接:
https://note.mafengwo.net/img/xx/yy/example.jpeg,1.5M
使用场景
当用户说出类似需求时触发:
- “帮我下载马蜂窝图片 https://www.mafengwo.cn/..."
- “不要缩略图,要原图”
- “导出原始图片链接和大小”
- “继续下载剩余图片,不要重复下载”
输出规范
- 只保存原图,不保存缩略图。
- 图片链接必须去掉
?及其后面的压缩、裁剪、质量参数,例如去掉imageView2%2F2%2Fw%2F600%2Fq%2F50。 - 输出文件夹命名为
YYYYMMDD图片下载-地点或网页标题-原图。 - 地点名称优先从页面面包屑、标题或明显地点信息中提取,例如
意大利;没有可靠地点时使用网页标题。 - 原图链接清单命名为
original_image_links.txt。 original_image_links.txt每行格式为原始链接,文件大小M,例如https://note.mafengwo.net/img/xx/yy/example.jpeg,1.5M。- 支持断点续下:已存在且有效的图片不要重复下载,缺失、零字节或损坏的图片需要补下。
执行流程
- 在可渲染页面的浏览器环境中打开马蜂窝 URL。
- 如果马蜂窝出现安全校验、滑块或登录阻断,让用户在浏览器里手动完成后继续。
- 从渲染后的 DOM 中提取图片候选链接,优先读取:
data-original, data-src, data-url, data-rt-src, src.
- 只保留正文或图集中的图片,马蜂窝原图通常来自
note.mafengwo.net/img/...。 - 对每个图片链接去掉
?及其后面的所有内容。 - 去重后保存为
raw_image_links.txt,再调用下载脚本。 - 运行
scripts/download_original_images.py完成下载、断点续下、大小统计和清单生成。 - 下载后校验数量、图片有效性,以及最终链接清单中是否仍存在
?或imageView2。
浏览器提取
优先使用宿主 agent 提供的浏览器自动化能力提取渲染后的图片链接。如果没有可用自动化能力,先在普通浏览器完成页面验证,再把以下代码粘贴到 DevTools Console:
copy([...new Set([...document.images]
.map(img => img.dataset.original || img.dataset.src || img.dataset.url || img.dataset.rtSrc || img.src)
.filter(Boolean)
.map(url => url.startsWith("//") ? `https:${url}` : url)
.filter(url => /^https?:\/\//.test(url))
.filter(url => /\.(jpe?g|png|webp|gif)(\?|$)/i.test(url))
.filter(url => /note\.mafengwo\.net\/img\//.test(url))
)].join("\n"))
将复制出来的内容保存为 raw_image_links.txt。
下载命令
python3 scripts/download_original_images.py \
--url "https://www.mafengwo.cn/photo/10051/scenery_24796451_1.html" \
--raw-links raw_image_links.txt \
--place "意大利" \
--page-title "从佛罗伦萨到多洛米蒂,繁花盛开的序曲" \
--out-root .
脚本会执行以下工作:
- 去掉缩略图 query 参数。
- 对原图链接去重。
- 将文件命名为
original_001.jpeg、original_002.png等。 - 跳过已经下载且有效的图片。
- 重新下载损坏、零字节或缺失的图片。
- 以
M为单位写入文件大小,例如0.2M、1.5M。 - 写入
summary.json和download_check.json。
校验标准
下载完成后运行:
wc -l original_image_links.txt
find images -type f | wc -l
grep -nE 'imageView2|\?' original_image_links.txt
du -sh .
预期结果:
- 链接数量等于图片文件数量。
grep检查imageView2或?时没有任何输出。download_check.json中missing和invalid都为 0。- 抽查图片尺寸应接近原图尺寸,而不是 600px 级别的缩略图。
Agent 适配
本 skill 的 SKILL.md 保持 agent-neutral:只描述任务流程、输入输出和校验标准,不绑定某个 agent 的私有工具。需要适配具体 agent 时,只读取对应 adapter:
- Claude Code:
adapters/claude-code.md - OpenClaw:
adapters/openclaw.md - Codex:
adapters/codex.md - Generic browser workflow:
adapters/generic-browser.md
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: linshidream
- Source: linshidream/skill-hub
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.