# Khan Academy Course Downloader/Ripper

**URL:** <https://onehack.st/t/khan-academy-course-downloader-ripper/54763>\
**Category:** Tools & Scripts\
**Tags:** learning, tools\
**Created:** [August 26, 2019, 9:15pm UTC](https://onehack.st/t/khan-academy-course-downloader-ripper/54763 "2019-08-26T21:15:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheJoker](https://onehack.st/user_avatar/onehack.st/thejoker/32/22660_2.png) [@TheJoker](https://onehack.st/u/TheJoker)\
**Post date:** [August 26, 2019, 9:15pm UTC](https://onehack.st/t/khan-academy-course-downloader-ripper/54763/1 "2019-08-26T21:15:07Z")

</div>

![Image result for khan academy images](https://i0.wp.com/elearning.tki.org.nz/var/eel/storage/images/media/images/khan-academy2/51209-1-eng-NZ/Khan-Academy_imagelarge.png)

VINOD PILLAI - After spending couple of hours searching for a simple downloader for courses on Khan Academy, and finding nothing, I decided to build one myself.

It’s one shell script containing less than 20 lines of code. That’s it.

Please feel free to use or modify/fork it as required for your use case.

# [https://gitlab.com/nonstophacker/khanacademy\_course\_downloaderDescription](https://gitlab.com/nonstophacker/khanacademy_course_downloaderDescription)

# khanacademy\_course\_downloader

**Dependencies**

sudo apt-get install html-xml-utils curl python-pip

sudo pip install youtube-dl

youtube-dl usage example:-

_youtube-dl -o ‘%(playlist)s/%(playlist\_index)s. %(title)s.%(ext)s’ [https://www.khanacademy.org/math/cc-2nd-grade-math/cc-2nd-add-subtract-100](https://www.khanacademy.org/math/cc-2nd-grade-math/cc-2nd-add-subtract-100)_

**How does it work?** Given a URL on a specific topic in a course, youtube-dl utility is able to download all embedded youtube videos.

Khan Academy courses are basically a collection of multiple topics. The download script dka.sh basically parses the main course page, extracts the topic URLs and iterates through each of them to download embedded videos using youtube-dl utility.

**Usage** dka.sh

For example, to download 2nd grade math course from Khan Academy:-

_dka.sh [https://www.khanacademy.org/math/cc-2nd-grade-math](https://www.khanacademy.org/math/cc-2nd-grade-math)_

As of April 2nd, 2019, this utility is working as expected.
