Douyin downloader
Skill MarecGents/marec-agent-skills/skills/douyin-downloader
A collection of reusable Agent Skills that extend AI coding agents with specialized capabilities — multi-agent orchestration, workflow automation, tool integrations, and more. Following the Agent Skills format. Built for the MarecGents ecosystem.
npx -y skills add MarecGents/marec-agent-skills --skill douyin-downloaderAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
下载抖音(Douyin/TikTok中国版)无水印原视频 — 从分享链接直接提取4K视频直链,无需登录、无需cookies、无需第三方API。当用户提到"抖音视频下载"、"抖音链接"、"抖音去水印"、"douyin download"、"保存抖音视频"等任何与抖音视频下载相关需求时,务必使用本技能,即使只是问"能不能下载某个抖音视频"。
SKILL.md
2.5 KB, as published. Nobody here has run it
抖音视频下载
从抖音分享链接下载无水印原视频。通过解析抖音移动端分享页面的 window._ROUTER_DATA 提取视频直链,无需 cookies、无需登录、无需第三方 API。
脚本位置
- 主脚本:
scripts/douyin_dl.py - 运行依赖: Python 3 +
requests库
安装依赖
pip install requests
使用方法
python scripts/douyin_dl.py "<抖音链接>"
# 指定输出文件名
python scripts/douyin_dl.py "https://v.douyin.com/dl1KJ_7jHuM/" -o 我的视频.mp4
支持链接格式
https://v.douyin.com/xxxxx/— 短链接(推荐)https://www.douyin.com/video/xxxxx— 网页版链接https://www.iesdouyin.com/share/video/xxxxx/— 国际版链接
工作原理
- 解析链接:跟随短链接重定向,提取
video_id - 获取信息:用移动端 UA 请求
iesdouyin.com/share/video/{id}/ - 提取数据:从 HTML 中提取
window._ROUTER_DATAJSON(花括号配对解析) - 获取直链:从
loaderData → video_(id)/page → videoInfoRes → item_list[0] → video → play_addr → url_list获取视频直链 - 下载:以 4K 原画质下载无水印视频,保存为
douyin_{video_id}.mp4
输出说明
- 格式: MP4,4K 原画质,无水印
- 大小: 4K 视频通常 200-500 MB
- 文件位置: 当前工作目录或
-o指定路径
如果脚本失效(调试指南)
抖音可能更新页面结构导致提取失败。调试步骤:
- 用 iPhone UA 手动访问
https://www.iesdouyin.com/share/video/{video_id}/ - 在页面源码中搜索
_ROUTER_DATA - 追踪新的 JSON 路径找到
url_list - 更新
douyin_dl.py中的提取路径
限制
- 仅支持公开视频(私密/已删除的视频无法下载)
- 抖音 API 可能更新导致数据结构变化,届时需适配
_ROUTER_DATA路径 - 如需小文件,可修改脚本中
get_download_url的ratio参数选择较低分辨率