← All reportsPublic report

ytdl-org/youtube-dl

Command-line program to download videos from YouTube.com and other video sites

141k stars Python View on GitHubprofiled 11d ago
Try GitZoid
0PRs this week
0Contributors
0Deps scanned
0Issues found
01 · Repo overview

How youtube-dl is put together

youtube-dl is a pure-Python command-line program that downloads videos from YouTube and hundreds of other sites. It has no framework or datastore: a CLI layer (options.py, __init__.py) parses arguments into a YoutubeDL options dict, a central orchestrator (YoutubeDL.py) dispatches URLs to per-site InfoExtractor classes under youtube_dl/extractor/, which return format metadata that is passed to protocol-specific downloaders under youtube_dl/downloader/. Site-specific JavaScript challenges are handled by an in-repo JS interpreter (jsinterp.py) plus AES and SWF interpreters, and the tool can self-update by fetching binaries at runtime.

Languages

PythonShell

Infrastructure

GitHub Actions CIWindows service wrapper (advapi32 via ctypes) in devscripts/buildserver.pytox test runnerwine-py2exe Windows packaging script

Major components

CLI & option parsing

youtube_dl/__init__.py, __main__.py and options.py define the full command-line interface, configuration-file loading, and conversion of argv into YoutubeDL options.

Core orchestrator (YoutubeDL)

YoutubeDL.YoutubeDL coordinates extraction, format selection, filtering, post-processing, progress reporting, and error handling for each URL.

Site extractors

The ~1000+ modules in youtube_dl/extractor/ each implement an InfoExtractor with a _VALID_URL regex, embedded _TESTS, and _real_extract to scrape one site's video metadata and formats.

Downloaders

youtube_dl/downloader/ implements per-protocol download engines: http, hls, dash, f4m, ism, rtmp, rtsp, fragmented, niconico, and delegation to external tools (external.py).

JS/AES/SWF interpretation

jsinterp.py, aes.py, swfinterp.py, and traversal.py interpret site JavaScript, decrypt ciphered signatures, and evaluate Flash SWF logic without external runtimes.

Compatibility layer

compat.py and casefold.py shim Python 2.6/2.7 vs 3.x differences (urllib, socketserver, winreg, etc.) so one codebase runs on all supported interpreters.

Self-update & caching

update.py implements the -U self-update flow that downloads new builds at runtime, while cache.py persists extracted data locally.

Release/dev tooling

devscripts/ contains build automation: buildserver.py (a Windows-hosted HTTP build service), completion generators, manpage/readme generators, GitHub release signing scripts, and cli_to_api.py.

02 · Weekly changes

No digest this week

1 weeksWeek of

03 · Security check

Dependencies and code review

0 dependencies scanned

Dependency advisories

Security Watch

No known advisories across 0 scanned dependencies.

No known advisories in the scanned dependencies.

Code review

No concrete code-level issues confirmed.

Get this report every week for your repos.

GitZoid learns each repo, reports what changed, and flags what needs attention. One flat price for the whole team.

$19 a month, flat · First 10 outputs free · No card required