UdemySaver is an open-source Udemy course downloader written in modern C++20. It lets you save videos, subtitles, and course assets you own for offline learning. A built-in HTTP server powers a responsive web interface so you can browse your Udemy library, queue downloads, and monitor progress from any browser.
- Download Udemy courses, lectures, subtitles, and attachments for offline access.
- Responsive web interface to browse your Udemy library.
- Queue and monitor downloads for single lectures or entire courses.
- Automatically organizes files under a structured
downloads/directory. - Cross-platform build via CMake for Windows, macOS, and Linux.
| Tool/Library | Notes |
|---|---|
| C++20 compiler | MSVC / Clang / GCC |
| CMake 3.20 or newer | Build system |
| Internet connection | CMake fetches curl, Boost, JSON and FFmpeg on Windows |
git clone https://github.com/jadis0x/UdemySaver.git
cd UdemySaver
cmake --preset x64-release --fresh
cmake --build --preset x64-releaseThe Windows build does not use vcpkg. CMake fetches an LGPL shared FFmpeg
development package and copies its runtime DLLs next to UdemySaver.exe.
On macOS, install the native FFmpeg dependency with Homebrew. Curl, Boost and nlohmann_json are downloaded automatically by CMake for the active CPU architecture.
# Install dependencies
brew install ffmpeg pkg-config cmake
# Clone and build
git clone https://github.com/jadis0x/UdemySaver.git
cd UdemySaver
rm -rf build # required if this directory was previously configured as x86_64
cmake -S . -B build -DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build buildThe executable will be at build/UdemySaver/UdemySaver
Create a settings.ini alongside the executable:
# UdemySaver settings
udemy_access_token=PASTE_YOUR_TOKEN_HERE
udemy_client_id=PASTE_YOUR_CLIENT_ID_HERE
udemy_api_base=https://www.udemy.com
http_proxy=http://127.0.0.1:8888
download_subtitles=true
download_assets=trueDRM-protected DASH lectures are preserved as separate encrypted video and audio
fragmented-MP4 files. UdemySaver downloads the MPD initialization and media
segments directly with libcurl. It does not request a DRM license, decrypt the
result, or make the downloaded files playable. A per-lecture
.encrypted.drm.json sidecar stores PSSH values from the MPD and the transient
license URL supplied by the lecture API. Treat it as sensitive because that URL
can contain an authentication token.
You can also start the program without a token and paste it via the web interface; the file will be created automatically.
Note: Due to Cloudflare protection on Udemy's API, you need to use a proxy like mitmproxy to bypass bot detection. See the "Cloudflare Bypass" section below.
- Log in to Udemy in your browser.
- Open the developer tools (F12) and head to the Application/Storage tab.
- Under Cookies for
www.udemy.com:- Copy the entire value of
access_token(including the colon:in the middle) - Copy the value of
client_id
- Copy the entire value of
- Use these values in
settings.inior paste the access token into the web UI when prompted.
Important: The access_token cookie has TWO parts separated by a colon (format: public_key:private_key). You must copy the complete value including both parts.
- Run the application:
./UdemySaver- Open a browser at http://127.0.0.1:8080.
- If prompted, paste your Udemy access token.
- Browse your library, choose a course, and click Download.
- Files are saved under a
downloads/directory.
Udemy uses Cloudflare protection to block automated API requests. To bypass this, you need to route UdemySaver through a local proxy like mitmproxy.
-
Install mitmproxy:
# macOS brew install mitmproxy # Linux pip install mitmproxy # Windows # Download from https://mitmproxy.org
-
Start mitmproxy:
mitmproxy --listen-port 8888
Keep this running in a separate terminal.
-
Configure settings.ini: Add the proxy setting to your
settings.ini:http_proxy=http://127.0.0.1:8888 -
Run UdemySaver:
cd build/UdemySaver ./UdemySaver -
Access the web interface: Open http://127.0.0.1:8080 in your browser.
The proxy will intercept and forward all requests, bypassing Cloudflare's bot detection. SSL certificate verification is automatically disabled when using a proxy.
Udemy's Cloudflare protection uses:
- TLS fingerprinting to detect non-browser clients
- HTTP/2 fingerprinting
- Browser-specific headers (sec-ch-ua)
Routing through mitmproxy makes requests appear as if they're coming from a legitimate browser, allowing downloads to work.
This fork includes several enhancements for macOS compatibility:
- Platform-aware CMake configuration - Automatically detects macOS and uses Homebrew dependencies
- Custom FFmpeg finder module - Locates FFmpeg libraries via pkg-config on macOS
- Fixed Windows-only code - Wrapped Windows-specific headers and macros in
#ifdef _WIN32 - Boost compatibility - Updated to work with Homebrew's Boost 1.90+ (header-only mode)
- Proxy SSL bypass - Automatically disables SSL verification when using a proxy (required for mitmproxy)
- Client ID support - Added
udemy_client_idconfiguration option - Browser fingerprinting headers - Includes sec-ch-ua headers to help bypass Cloudflare
After building, the executable is located at:
build/UdemySaver/UdemySaver
Run it from this directory to ensure settings.ini and the www/ folder are properly located.
This tool is intended for downloading courses you have legally purchased. Respect Udemy's Terms of Service and local laws when using it.
This project is licensed under the MIT License.

