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.
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
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.
For example, to download 2nd grade math course from Khan Academy:-
As of April 2nd, 2019, this utility is working as expected.