Major rewrite of code architecture, new features, and API & Chrome compatibility fixes
- Description
- What's New in This Fork
- Installation
- Getting Started
- New Usage: Export Course Metadata
- Use Cases & Projects
- Documentation
- User Privacy
- Disclaimer
This is an enhanced fork of the original Datacamp Downloader with significant improvements and new features.
Datacamp Downloader is a command-line interface tool developed in Python to help you download your completed contents on Datacamp and keep them locally on your computer.
The tool helps you download all videos, slides, audios, exercises, transcripts, datasets and subtitles in organized folders.
1) Core Compatibility Fix (Already Merged in PR #84)
Fixed compatibility issues with the current DataCamp API and modernized ChromeDriver setup. This fix was merged into the original repository in Pull Request #84.
Added a new export-courses command that exports comprehensive metadata about your completed courses to CSV format. The exported data includes:
- Basic Info:
id,title,description,short_description,slug - Course Details:
programming_language,difficulty_level,xp,state,paid - Time/Duration:
time_needed_in_hours,duration_minutes - Classification:
topic_id,technology_id,content_area,type - Media:
link,image_url,last_updated_on - Stats:
nb_of_subscriptions,num_chapters,num_exercises,num_videos,datasets_count - People:
instructors_names,collaborators_names - Relationships:
tracks_titles,prerequisites_titles
Improved the internal structure of the classes, functions, and commands of the codebase with:
- Robust Course Class: Enhanced
Courseclass constructor that safely handles API response data with comprehensive error handling and fallback mechanisms - Better Data Parsing: Improved parsing of nested objects (chapters, datasets, instructors, collaborators, tracks, prerequisites) with graceful error handling
- Enhanced Error Management: Added comprehensive error handling in course fetching with proper fallback strategies and user-friendly error messages
- Flexible Field Handling: Support for both legacy and current API field names with automatic fallback mechanisms
- Data Validation: Added validation for required fields and safe defaults for optional fields
- Memory Management: Better handling of large datasets and memory-efficient processing of course metadata
Recommended: Install in an isolated virtual environment to avoid dependency conflicts:
python -m venv datacamp-env
datacamp-env\Scripts\activate
pip install git+https://github.com/Michael-Matta1/datacamp-downloader.gitpython -m venv datacamp-env
source datacamp-env/bin/activate
pip install git+https://github.com/Michael-Matta1/datacamp-downloader.gitAlternatively, install directly (not recommended):
pip install git+https://github.com/Michael-Matta1/datacamp-downloader.gitTo enable command autocompletion:
datacamp --install-completion [bash|zsh|fish|powershell|pwsh]Then restart your terminal.
Note: Autocompletion might not be supported by all operating systems.
- To login using your username or password, run:
datacamp login -u [USERNAME] -p [PASSWORD]or simply run:
datacamp login- To login using Datacamp authentication token, run:
datacamp set-token [TOKEN]Datacamp authentication token can be found in Datacamp website browser cookies. To get your Datacamp authentication, follow these steps:
Firefox
- Visit datacamp.com and log in.
- Open the Developer Tools (press
Cmd + Opt + Jon MacOS orF12on Windows). - Go to Storage tab, then Cookies >
https://www.datacamp.com - Find
_dctkey, its Value is the Datacamp authentication token.
Chrome
- Visit datacamp.com and log in.
- Open the Developer Tools (press
Cmd + Opt + Jon MacOS orF12on Windows). - Go to Application tab, then Storage > Cookies >
https://www.datacamp.com - Find
_dctkey, its Value is the Datacamp authentication token.
Security Note
Datacamp authentication token is a secret key and is unique to you. You should not share it publicly.
If you provided valid credentials, you should see the following:
Hi, YOUR_NAME
Active subscription found
Active subscription is not required anymore.
First, you should list your completed courses/track.
To list your completed courses, run:
datacamp coursesTo list your completed tracks, run:
datacamp tracksSimilar output to this should appear with your completed courses/tracks:
+--------+------------------------------------------+------------+------------+------------+
| ID | Title | Datasets | Exercises | Videos |
+--------+------------------------------------------+------------+------------+------------+
| 1 | Introduction to Python | 2 | 46 | 11 |
+--------+------------------------------------------+------------+------------+------------+
| 2 | Introduction to SQL | 1 | 40 | 1 |
+--------+------------------------------------------+------------+------------+------------+
| 3 | Intermediate Python | 3 | 69 | 18 |
+--------+------------------------------------------+------------+------------+------------+
| 4 | Introduction to Data Science in Python | 0 | 31 | 13 |
+--------+------------------------------------------+------------+------------+------------+
| 5 | Data Science for Everyone | 0 | 33 | 15 |
+--------+------------------------------------------+------------+------------+------------+
| 6 | Joining Data in SQL | 3 | 40 | 13 |
+--------+------------------------------------------+------------+------------+------------+
| 7 | Data Manipulation with pandas | 4 | 41 | 15 |
+--------+------------------------------------------+------------+------------+------------+
| 8 | Supervised Learning with scikit-learn | 7 | 37 | 17 |
+--------+------------------------------------------+------------+------------+------------+
| 9 | Machine Learning for Everyone | 0 | 25 | 12 |
+--------+------------------------------------------+------------+------------+------------+
| 10 | Python Data Science Toolbox (Part 1) | 1 | 34 | 12 |
+--------+------------------------------------------+------------+------------+------------+
Now, you can download any of the courses/tracks with:
datacamp download id1 id2 id3For example to download the first and second course, run:
datacamp download 1 2- To download all your completed courses, run:
datacamp download all- To download all your completed tracks, run:
datacamp download all-tThis by default will download videos, slides, datasets, exercises, english subtitles and transcripts in organized folders in the current directory.
To customize this behavior see datacamp download command in the Documentation.
Export your completed course metadata to CSV:
datacamp export-coursesOptions:
--output: Specify output file (default:completed_courses.csv)--refresh: Refresh course data from API before exporting
Example:
datacamp export-courses --output my_courses.csv --refreshThe CSV file can be opened in Excel, Google Sheets, or any spreadsheet application for analysis and reporting.
This downloader enables various data analysis and AI-powered learning projects:
Create an intelligent AI tutor from your downloaded course materials using Retrieval-Augmented Generation (RAG).
Features:
- Chat with your course content using advanced memory capabilities
- Get personalized course recommendations based on your learning history
- Semantic search through your downloaded materials
- Memory-driven responses that adapt to your background and preferences
Repository: DataCompanion RAG Tutor
Export and analyze your learning journey with comprehensive course metadata.
What's included:
- Complete dataset of DataCamp course metadata with 23+ fields
- Learning metrics, course structures, and engagement data
- Interactive visualizations and progress tracking
- Technology and topic mapping for detailed analysis
Dataset: DataCamp Courses Metadata on Kaggle
Explore interactive visualizations of learning patterns and course analytics.
Features:
- Learning progress tracking and pattern analysis
- Course structure visualization and difficulty mapping
- Technology and topic distribution analysis
- Personalized learning path recommendations
Notebook: Learning Journey Visualization
Full command documentation is available in docs.md
datacamp creates a session file with your credentials saved in the temp folder. If you no longer need to use the tool, it is preferable to reset the session, which will remove the saved file, with:
datacamp resetThis tool is for personal use only. Sharing DataCamp course content violates their Terms of Use. The developers are not responsible for any misuse of this tool.
This CLI is provided to help you download Datacamp courses/tracks for personal use only. Sharing the content of the courses is strictly prohibited under Datacamp's Terms of Use.
By using this CLI, the developers of this CLI are not responsible for any law infringement caused by the users of this CLI.