A tool to download Domestika courses you have purchased. This version is tested on macOS and Linux/Unix systems.
- How It Works
- Features
- Prerequisites
- Installation
- Usage
- Configuration
- File Structure
- Troubleshooting
- FAQ
- Contributing
- Future Enhancements
- License
The downloader uses your Domestika session cookies to authenticate and download course videos. It:
- Accepts course URLs in any format (main page, specific units, or course pages)
- Authenticates using cookies stored in a
.envfile - Downloads videos using
N_m3u8DL-REfor HLS streams - Processes videos with
ffmpegto embed subtitles and convert to MP4 - Organizes downloads by course and section
- Multiple course downloads: Download several courses simultaneously
- Flexible URL support: Accepts any Domestika URL format:
- Course main page:
https://www.domestika.org/en/courses/1234-course-name - Specific unit:
https://www.domestika.org/en/courses/1234-course-name/units/5678-unit - Course page:
https://www.domestika.org/en/courses/1234-course-name/course
- Course main page:
- Subtitle support: Download subtitles in multiple languages (Spanish, English, Portuguese, French, German, Italian)
- Subtitles are embedded as tracks in the MP4 video
- Independent SRT files are also generated
- Automatic credential management: Cookies are stored securely in
.envand validated automatically - Parallel downloads: Multiple videos download simultaneously for faster processing
- Progress tracking: Detailed progress information for each download
- Error handling: Automatic retry with cookie refresh when authentication fails
- ffmpeg:
brew install ffmpeg
- ffmpeg:
- Ubuntu/Debian:
sudo apt update && sudo apt install ffmpeg - Fedora/RHEL:
sudo dnf install ffmpeg
- Arch Linux:
sudo pacman -S ffmpeg
- Or install from ffmpeg.org
- Ubuntu/Debian:
-
N_m3u8DL-RE:
- Download the appropriate binary for your platform from GitHub releases
- Place it in the project folder
- Make sure the name is
N_m3u8DL-RE(without extension on Unix-like systems, orN_m3u8DL-RE.exeon Windows) - Make it executable (Unix-like systems):
chmod +x N_m3u8DL-RE
-
Node.js and npm
-
Clone the repository:
git clone https://github.com/PandaSekh/domestika-downloader-V3.git cd domestika-downloader-V2 -
Install dependencies:
npm i
-
Run the program:
npm start
-
First-time setup (if cookies are not configured):
- The program will prompt you to provide your Domestika cookies
- Open your browser's Developer Tools (F12)
- Go to Storage → Cookies
- Copy the values for:
_domestika_session_credentials
- Cookies are saved to
.envautomatically
-
Enter course URLs:
- Enter one or multiple URLs separated by spaces
- Any valid Domestika course URL format is accepted
-
Select subtitles:
- Choose if you want to download subtitles
- Select your preferred language
-
Monitor downloads:
- Progress is shown for each video
- If authentication fails, you'll be prompted to update cookies
Set a custom download location by adding to your .env file:
DOWNLOAD_PATH=/path/to/your/downloads/courses
- Use an absolute path for a specific location
- Use a relative path (e.g.,
./my_courses) for a folder in the project directory - If not set, defaults to
domestika_courses/in the project directory
Cookies are stored in .env and automatically validated. If cookies expire or become invalid, the program will prompt you to update them.
Enable detailed logging by adding to your .env file:
DEBUG=true
When enabled, shows additional debug information including:
- Memory usage statistics
- ffmpeg commands being executed
- File operations (subtitle deletion, file sizes, etc.)
- Download queue progress details
- CSV loading statistics
This is useful for troubleshooting issues or understanding what the downloader is doing behind the scenes. By default, debug mode is disabled (DEBUG=false).
Downloads are organized as follows:
[DOWNLOAD_PATH]/
└── Course Name/
└── Section/
├── Course Name - U1 - 1_Video Name.mp4
└── Course Name - U1 - 1_Video Name.srt
You can use input.csv to batch download multiple courses. Create a file named input.csv in the project root with the following format:
url;subtitles;downloadOption
https://www.domestika.org/en/courses/1234-course-name;es,en;all
https://www.domestika.org/en/courses/5678-another-course;en;specificColumns:
url: Course URL (required)subtitles: Comma-separated language codes (optional):es,en,pt,fr,de,itdownloadOption:allorspecific(optional, defaults toall)
Note: The CSV uses semicolon (;) as delimiter.
If subtitles are not being embedded into videos:
-
Check if subtitles were downloaded:
- Look for
.srtfiles in the download directory - Enable debug mode (
DEBUG=truein.env) to see detailed logs
- Look for
-
Verify subtitle format:
- Subtitles must be in SRT format
- Check that subtitle files are not empty
- Ensure files contain valid timestamps and text
-
Check ffmpeg installation:
- Run
ffmpeg -versionto verify ffmpeg is installed - Ensure ffmpeg is in your PATH
- Run
-
Review error messages:
- The tool logs detailed error messages when subtitle operations fail
- Check console output for warnings like
⚠️ Failed to download [LANG] subtitles
-
Common issues:
- Subtitle language not available: Some videos may not have subtitles in your selected language
- File naming mismatch: N_m3u8DL-RE may save subtitles with different naming patterns
- ffmpeg errors: Check that your ffmpeg version supports subtitle embedding
If you get authentication errors:
-
Update cookies:
- Cookies expire after some time
- The tool will prompt you to update cookies when they're invalid
- Get fresh cookies from your browser's Developer Tools
-
Verify cookie format:
- Ensure
DOMESTIKA_SESSIONandDOMESTIKA_CREDENTIALSare set correctly in.env - Copy the full cookie values without extra spaces or quotes
- Ensure
If downloads fail:
-
Check N_m3u8DL-RE:
- Verify the binary exists and is executable
- Ensure it's the correct version for your platform
-
Network issues:
- Check your internet connection
- Some videos may require multiple retry attempts
-
Disk space:
- Ensure you have enough disk space for downloads
- Videos can be large (hundreds of MB to several GB)
-
Enable debug mode:
- Set
DEBUG=truein.envfor detailed error information
- Set
No. This tool only works with courses you have legitimately purchased. You must use your own Domestika account cookies.
See the Troubleshooting section above. Common causes include:
- Subtitle language not available for that video
- ffmpeg not installed or not in PATH
- Subtitle file format issues
Yes! You can:
- Enter multiple URLs separated by spaces when prompted
- Use
input.csvto batch process multiple courses - The tool processes courses sequentially but downloads videos in parallel
The tool attempts to download 1080p first, then falls back to the best available quality if 1080p is not available.
Set the DOWNLOAD_PATH environment variable in your .env file:
DOWNLOAD_PATH=/path/to/your/downloads
Currently, the tool is only tested on macOS and Linux/Unix systems.
The tool will automatically prompt you when cookies expire. You can also manually update them in the .env file or run the tool and it will ask for new cookies.
The tool checks for existing video files and skips already downloaded videos. If a download is interrupted, you can run the tool again and it will continue from where it left off.
Supported languages: Spanish (es), English (en), Portuguese (pt), French (fr), German (de), Italian (it). You can select multiple languages separated by commas.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
For potential future enhancements and features, see FUTURE.md.
ISC