download-web-video
Skill4 starsChanged 55 days agoMITView on GitHub
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, prepare source media for transcription or visual analysis, or produce a reproducible download bundle without exposing cookies or signed media URLs.
- Installs packages
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-repo-scaffoldSkill
- agent-travel-plannerSkill
- ai-workflow-spineSkill
- ana-awardSkill
- analyze-video-evidenceSkill
- apple-pdfSkill
- audit-fix-loopSkill
- autonomous-grindSkill
- award-flightsSkill
- banxian-skillSkill
- big-taskSkill
- clean-room-rewriteSkill
- cloudflare-r2-setupSkill
- codebase-sweepSkill
- context-infrastructureSkill
- deep-researchSkill
- dr-sharpSkill
- game-script-creationSkill
- gemini-imageSkill
- gpt-imageSkill
- investigateSkill
- jewelry-marketingSkill
- learning-coachSkill
- mineru-pdf-parserSkill
- mtcSkill
- narrative-researchSkill
- neat-freakSkill
- pet-forgeSkill
- plan-design-reviewSkill
- pr-fix-loopSkill
- proxy-node-setupSkill
- serenity-bottleneck-researchSkill
- task-shaped-agent-routingSkill
- transcribeSkill
- tridentSkill
- tui-engineeringSkill
- wandian-writerSkill
- web-novel-writingSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Treat browser cookies and signed media URLs as credentials.
- Distinctive: line 27
Run the bundled wrapper:
- Distinctive: line 44
Use a Netscape cookie file only when the user supplies one:
- Very specific: line 52
Do not assume that --cookies-from-browser chrome means the target site is logged in.
- Distinctive: line 73
Read references/acceleration.md before changing the host policy, validation boundary, or local yt-dlp plugin.
- Very specific: line 87
Every required audio/video track opens with ffprobe and reaches the metadata duration within tolerance.
- Very specific: line 96
Write all results beneath --output-dir:
- Distinctive: line 107
Keep the bundle project-local or in a user-approved destination.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Download Web Video
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.
Prerequisites
Require yt-dlp and ffmpeg; use aria2c when available. On macOS:
brew install yt-dlp ffmpeg aria2Treat 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.
Download
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.
Choose the lightest mode
- Need only captions/metadata: add
--metadata-only. - Need no private browser state: omit both cookie options.
- Need a single entry from an anthology or playlist: keep the default
--no-playlistbehavior. - Need the full playlist: add
--playlistonly with user intent. - Need predictable native transfer behavior: add
--accelerator off. - Need to test the plan without network access: add
--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.
Verify the bundle
Require all applicable conditions:
manifest.jsonexists and identifies the original page URL, site, selected downloader, CDN probe results, output files, sizes, and SHA-256 hashes.- At least one media file exists unless
--metadata-onlywas requested. - A
.info.jsonsidecar exists. - Requested captions exist when the site advertises them; otherwise report that captions were unavailable rather than inventing a transcript.
manifest.jsoncontains neither cookie values nor signed media URLs.- Every required audio/video track opens with
ffprobeand reaches the metadata duration within tolerance. Container duration alone is insufficient: a Bilibili MP4 can report the full duration while one track ends early. - A failed validation exits non-zero and does not write a success manifest.
Retry in a clean output directory with
--accelerator off; do not reuse a suspect.partfile.
Output
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.jsonKeep 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

