Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

200 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Datacamp Downloader (Enhanced Fork)

Version Python License

Major rewrite of code architecture, new features, and API & Chrome compatibility fixes

Table of Contents

Description

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.

What's New in This Fork

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.


2) New Feature: Course Metadata Export

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

3) Enhanced Code Architecture

Improved the internal structure of the classes, functions, and commands of the codebase with:

  • Robust Course Class: Enhanced Course class 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

Installation

Recommended: Virtual Environment

Recommended: Install in an isolated virtual environment to avoid dependency conflicts:

Windows

python -m venv datacamp-env
datacamp-env\Scripts\activate
pip install git+https://github.com/Michael-Matta1/datacamp-downloader.git

Linux/macOS

python -m venv datacamp-env
source datacamp-env/bin/activate
pip install git+https://github.com/Michael-Matta1/datacamp-downloader.git

Alternative: Direct Installation

Alternatively, install directly (not recommended):

pip install git+https://github.com/Michael-Matta1/datacamp-downloader.git

Autocompletion

To 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.

Getting Started

Login

  • 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

  1. Visit datacamp.com and log in.
  2. Open the Developer Tools (press Cmd + Opt + J on MacOS or F12 on Windows).
  3. Go to Storage tab, then Cookies > https://www.datacamp.com
  4. Find _dct key, its Value is the Datacamp authentication token.

Chrome

  1. Visit datacamp.com and log in.
  2. Open the Developer Tools (press Cmd + Opt + J on MacOS or F12 on Windows).
  3. Go to Application tab, then Storage > Cookies > https://www.datacamp.com
  4. Find _dct key, 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.

Download

First, you should list your completed courses/track.

To list your completed courses, run:

datacamp courses

To list your completed tracks, run:

datacamp tracks

Similar 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 id3

For 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-t

This 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.

New Usage: Export Course Metadata

Export your completed course metadata to CSV:

datacamp export-courses

Options:

  • --output: Specify output file (default: completed_courses.csv)
  • --refresh: Refresh course data from API before exporting

Example:

datacamp export-courses --output my_courses.csv --refresh

The CSV file can be opened in Excel, Google Sheets, or any spreadsheet application for analysis and reporting.

Use Cases & Projects

This downloader enables various data analysis and AI-powered learning projects:

πŸ€– DataCompanion RAG Tutor

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

πŸ“Š Course Metadata Dataset & Analysis

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

πŸ“ˆ Learning Journey Visualization

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

Documentation

Full command documentation is available in docs.md

User Privacy

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 reset

Disclaimer

This 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.

About

Download your completed courses on Datacamp easily!

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages