算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
download-web-video【设计与创意】Download Bilibili and YouTube videos with yt-dlp, optional browser-profile or Netscape-file authentication, human/automatic captions, metadata, thumbnails, resumable transfers, and Bilibili CDN probing plus aria2 acceleration. Use when Codex must save an online video or captions locally, access formats/subtitles that require an existing browser login…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Produce a local evidence bundle with the media, captions, metadata, hashes, and a credential-safe manifest. Support single Bilibili and YouTube URLs by default; enable playlists only when the user asks.
Require yt-dlp and ffmpeg; use aria2c when available. On macOS:
brew install yt-dlp ffmpeg aria2
Treat browser cookies and signed media URLs as credentials. Pass cookies
directly to yt-dlp, never export or print their values, and never commit them.
The yt-dlp *.info.json artifact can contain short-lived signed format URLs;
keep it local even though manifest.json intentionally excludes those URLs.
Run the bundled wrapper:
python3 <skill-dir>/scripts/download_video.py \
"https://www.bilibili.com/video/BV..." \
--output-dir "./video-source" \
--cookies-from-browser "chrome:Default"
For YouTube, use the same command and URL shape. Authentication is optional:
python3 <skill-dir>/scripts/download_video.py \
"https://www.youtube.com/watch?v=..." \
--output-dir "./video-source"
Use a Netscape cookie file only when the user supplies one:
python3 <skill-dir>/scripts/download_video.py URL \
--output-dir "./video-source" \
--cookies "/path/to/cookies.txt"
Do not assume that --cookies-from-browser chrome means the target site is
logged in. yt-dlp chooses the most recently accessed Chrome profile. If
captions or member formats are unexpectedly absent, identify the intended local
profile and pass it explicitly, such as chrome:Default.
--metadata-only.--no-playlist behavior.--playlist only with user intent.--accelerator off.--dry-run; cookie-file
paths are redacted.For Bilibili VOD, auto probes a bounded UPOS candidate set and rewrites only
signed media hosts when the original is unhealthy or a candidate is materially
faster. It deliberately keeps yt-dlp's native single-stream downloader: some
UPOS mirrors mishandle resumed multi-range transfers. --accelerator force
opts into aria2 splitting, but the wrapper still rejects incomplete tracks.
Read references/acceleration.md before changing
the host policy, validation boundary, or local yt-dlp plugin.
Require all applicable conditions:
manifest.json exists and identifies the original page URL, site, selected
downloader, CDN probe results, output files, sizes, and SHA-256 hashes.--metadata-only was requested..info.json sidecar exists.manifest.json contains neither cookie values nor signed media URLs.ffprobe and reaches the
metadata duration within tolerance. Container duration alone is insufficient:
a Bilibili MP4 can report the full duration while one track ends early.--accelerator off; do not reuse a
suspect .part file.Write all results beneath --output-dir:
<output-dir>/
├── <video-id>.mp4 # unless metadata-only
├── <video-id>.<lang>.srt # when available
├── <video-id>.info.json
├── <video-id>.<thumbnail-ext>
└── manifest.json
Keep the bundle project-local or in a user-approved destination. Do not place downloaded media, cookies, or short-lived URLs inside this public skill source.