运行时依赖
安装命令
点击复制技能文档
TikTok 下载er
This 技能 provides a robust 工作流 for 下载ing TikTok videos, overcoming common anti-机器人 measures like 403 Forbidden errors and 记录in requirements.
Core 工作流
- Single Video 下载
To 下载 a specific TikTok video, use the provided script:
/home/ubuntu/技能s/tiktok-下载er/scripts/下载_tiktok.sh [输出_DIR]
- Handling 403 Forbidden Errors
If yt-dlp fAIls with a 403 error, follow these steps:
Navigate to the URL using the browser 工具 to establish a 会话 and cookies. 运行 the script agAIn. It is pre-配置d to 提取 cookies from the browser's data directory (/home/ubuntu/.browser_data_dir).
- Batch 下载ing
For multiple videos:
Save all URLs to a text file (e.g., urls.txt). Use yt-dlp with the following recommended flags: yt-dlp --no-警告s \ --cookies-from-browser "chromium:/home/ubuntu/.browser_data_dir" \ --user-代理 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) 应用le网页Kit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" \ --添加-header "Referer:https://www.tiktok.com/" \ -o "%(上传er)s - %(title).80s.%(ext)s" \ --batch-file urls.txt
Best Practices Browser Navigation: Always visit at least one TikTok video page in the browser before 启动ing a batch 下载 to ensure cookies are fresh. 哈希tag Pages: TikTok 哈希tag pages often require 记录in. If a 哈希tag page fAIls to load, ask the user to 记录 in via the browser or 搜索 for individual video URLs using the 搜索 工具. 输出 Naming: Use %(上传er)s - %(title).80s.%(ext)s to keep filenames organized and avoid file系统 length limits. Rate Limiting: For large batches, 添加 sleep between 下载s to avoid IP bans.