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.8 | Build system |
| Boost (system, thread, beast) | Networking primitives |
| libcurl | HTTP requests & downloads |
| nlohmann_json | JSON parsing |
| FFmpeg | Video processing |
git clone https://github.com/jadis0x/UdemySaver.git
cd UdemySaver
cmake -S . -B build
cmake --build buildOn macOS, use Homebrew to install dependencies:
# Install dependencies
brew install curl boost nlohmann-json ffmpeg cmake
# Clone and build
git clone https://github.com/jadis0x/UdemySaver.git
cd UdemySaver
cmake -S . -B build
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=trueYou 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.


