HOW TO DOWNLOAD FULL edX COURSES ON YOUR COMPUTER – Part 2

Yay! it’s finally here!

Hi everyone! it’s Faith again, your DIY expert and friend.

For most of you who have not seen my last post which the first part of this installment series HOW TO DOWNLOAD FULL edX COURSES ON YOUR COMPUTER – Part 1. Please do as it is necessary to enable you follow along well in this post.

In the last tutorial, we downloaded python interpreter and had it installed on our windows PC. We also did get pip package installer set up on our python. We ended with downloading the edx-dl package from the source’s github page.

Today which concludes the series, we shall be tying the knots together to start downloading free open edX courses onto your computer. And Note, you can also use this method to download courses from coursera, harvard etc.

Now, I asssume you have python installed on your computer and it’s running from the command line (CMD). And that you have downloaded the edx-dl package from github. I also know for now, PIP is set up on your python, OK?

Remember that I advised that you should extract the contents of the edx-dl ZIP downloaded into the C:\ or in fact anywhere you want to put it on your computer. The location doesn’t matter much.

Like I said earlier, this tutorial is basically for the non-programmers: people who cannot read documentation, debug etc. So hackers here should please bear with me because I will only put the codes, hook line and sinker for everyone to input and see the result, OK? Thanks.

STEP 1:
NAVIGATE TO THE FOLDER YOU EXTRACTED THE edx-dl PACKAGE ON YOUR COMPUTER FROM THE COMMAND LINE (CMD)

The very first step in this tutorial is that you navigate to the folder you extracted the edx-dl package from the command line. See both pictures of the said folder on my PC in GUI and in the DOS prompt (CMD).

By now, I’m sure you know how to open the Command Prompt on windows. If you’re not sure go back to check the part 1 of this series HOW TO DOWNLOAD FULL edX COURSES ON YOUR COMPUTER – Part 1

TYPE ON CMD PROMPT and press ENTER:
how to download edx courses on computer

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Win8>cd C:\edx-dl-master

Your prompt will change the current directory to the edx-dl like in the picture below.
how to download edx courses offline
Now that you have navigated into this folder, we are going to enter some commands before we start downloading. This takes us to Step 2 of this part.

STEP 2:
INSTALLATION OF edx-dl.
We have to install edx-dl tool first before any other thing which is not a big deal. Right from the prompt INSIDE THE EDX-DL-MASTER FOLDER, enter these commands. NB: You must have internet connection of course.

To install edx-dl run:
pip install edx-dl
See the image below

Once you type in the above command and press ENTER pip will install the edx-dl on your computer.

STEP 3:
UPDATE OR UPGRADE THE YOUTUBE DOWNLOADER (youtube-dl) BUNDLED WITH edx-dl

In the part 1 of this tutorial, I told you that one other important tool necessary is the youtube downloader which you don’t need to worry about because it has already been bundled with the edx-dl package you downloaded and installed in STEP 2.
To upgrade youtube-dl run:
pip install --upgrade youtube-dl
as in the image below

GREAT! We’re getting there.
Now, you have gotten everything set up to use edx-dl.py to download full edX courses onto your computer.

STEP 4:
You have to let edx-dl discover the courses you (in fact, all of the courses you ever enrolled in) on the edX platform.
You do this by typing inside the prompt in the edx-dl-master folder….
edx-dl -u user@user.com --list-courses
N.B: The user@user.com is the email you use on edX
So if the email you used to signup for edX is adamsmith2003@gmail.com ,
The above code will be :
edx-dl -u adamsmith2003@gmail.com --list-courses
Once you press ENTER, it will ask you (in that same BLACK command line) for your PASSWORD – the password you use to sign in to the edX website. See pictures!

how to download edx courses

THE RESULT OF THESE COMMANDS IS A LIST OF ALL THE COURSES YOU’RE ENROLLED ON EDX… SEE MINE IN THE PICTURE BELOW….
how to download edx courses on PC

Can you see a list of all the courses you are enrolled in on edX which you can access currently. Some courses such as those that are already archived may not be accessible through this means. But I bet you’ll find what you’re looking for there.

Copy the result from the above courses-list picture and paste them into some word processor – MS-word or notepad –
You will need the course-URL attached to each of the course on the list soon.

VERY IMPORTANT NOTE
I have to tell you this. I almost forgot actually. To copy from the Command line in windows is not easy so just RIGHT-CLICK on the TaskBar of the CMD prompt and choose “Properties” => THEN select “Quick Edit Mode” See picture…

how to download edx courses online

I’m so sorry for the digression….
Now, to download any course just get into the edx-dl-master folder on Command prompt

C:\edx-dl-master>
Type:
edx-dl -u user@user.com COURSE_URL
For example, I want to download the introduction to python for data science course…

I will do
edx-dl-master -u faitholusegun60@gmail.com https://courses.edx.org/courses/course-v1:Microsoft+DAT208x+4T2017/course/
Once you press enter, the edx-dl tool will ask for your password and download starts.

Once it is downloaded, a new folder “Downloaded” will be opened in your C:\edx-dl-master folder and you will find your courses downloaded inside – from videos to spreadsheet, codeblocks, PDF’s, everything in the course will be there.

That’s it for this tutorial. I hope you now understand how to download edX courses onto your computer.

Thank you very much for reading from the beginning till the end and I hope I didn’t bore you too much with my over illustrations.

So sip you favourite beverage and enjoy your downloaded edX courses without having to use internet and login to the edX website going from one section and module to another.

From your friend and DIY expert,
Faith.

Don’t forget to share this article with your friends. There are so many people who need it…

Leave questions in the comment section.

19 thoughts on “HOW TO DOWNLOAD FULL edX COURSES ON YOUR COMPUTER – Part 2

    1. I was having the same issue cause I was trying to install the anaconda package.. I just installed python from their web.. and inside the installation there is a option to install pip.. it worked perfect..

      Like

      1. Same error for me when I use Windows.
        “‘edx-dl’ is not recognized as an internal or external command,
        operable program or batch file.”

        When I use Mac, it finds an error when trying to read the list of courses.

        Please let me know any workarounds since it’s more than a year I want to make it work.

        Like

    2. That means either pip is not yet installed on your computer or it’s not accessible on the command line. Newer versions of Python come with pip. You should first confirm that you have python.

      Like

      1. What do you mean please?

        I have installed everything as described and am inside the folder when I run the command. I have run > pip install –upgrade edx-dl and it comes pack requirement satisfied but it does not work for me on Win10 with latest python and pip installed (I believe)

        Like

  1. hello! before anything.. thank you so much for doing this… I mean it.. this is great.. I have a question.. can I download more than 1 course at the same time? I mean.. can I copy more than 1 link and just wait until they are all downloaded?

    Like

  2. Hi Faith!
    First of all, thank you for this very thorough tutorial!

    I tried to execute it, but I’m getting these:
    File “c:\users\user\appdata\local\programs\python\python39\lib\urllib\request.py”, line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 403: Forbidden

    What do you suggest should I do? I’ve tried many times, double-checking everything and seems correct.

    Even listed the courses correctly, but this seems not to be working anymore :-/

    Thank you very much in advance!

    Like

  3. Not working see below::

    Building initial headers for future requests.
    Getting initial CSRF token.
    Found CSRF token.
    Logging into Open edX site: https://courses.edx.org/login_ajax
    Extracting course information from dashboard.
    Traceback (most recent call last):
    File “c:\users\user\appdata\local\programs\python\python39\lib\runpy.py”, line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File “c:\users\user\appdata\local\programs\python\python39\lib\runpy.py”, line 87, in _run_code
    exec(code, run_globals)
    File “C:\Users\user\AppData\Local\Programs\Python\Python39\Scripts\edx-dl.exe\__main__.py”, line 7, in
    File “c:\users\user\appdata\local\programs\python\python39\lib\site-packages\edx_dl\edx_dl.py”, line 1020, in main
    all_selections = {selected_course:
    File “c:\users\user\appdata\local\programs\python\python39\lib\site-packages\edx_dl\edx_dl.py”, line 1021, in
    get_available_sections(selected_course.url.replace(‘info’, ‘course’),
    File “c:\users\user\appdata\local\programs\python\python39\lib\site-packages\edx_dl\edx_dl.py”, line 184, in get_available_sections
    page = get_page_contents(url, headers)
    File “c:\users\user\appdata\local\programs\python\python39\lib\site-packages\edx_dl\utils.py”, line 58, in get_page_contents
    result = urlopen(Request(url, None, headers))
    File “c:\users\user\appdata\local\programs\python\python39\lib\urllib\request.py”, line 214, in urlopen
    return opener.open(url, data, timeout)
    File “c:\users\user\appdata\local\programs\python\python39\lib\urllib\request.py”, line 523, in open
    response = meth(req, response)
    File “c:\users\user\appdata\local\programs\python\python39\lib\urllib\request.py”, line 632, in http_response
    response = self.parent.error(
    File “c:\users\user\appdata\local\programs\python\python39\lib\urllib\request.py”, line 561, in error
    return self._call_chain(*args)
    File “c:\users\user\appdata\local\programs\python\python39\lib\urllib\request.py”, line 494, in _call_chain
    result = func(*args)
    File “c:\users\user\appdata\local\programs\python\python39\lib\urllib\request.py”, line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 403: Forbidden

    Like

  4. Hi Faith Olusegun,

    I followed your procedures until logging in my account. I am sure that I typed correct email and password, but still return “Wrong Email or Password”. Please tell me a solution. Thank you.

    Best regards,

    Like

  5. when I type in the command to teach it what my courses are it says edx is not an internal or external command. what am i doing wrong and how do i fix it. I really want to take a computer course from edx please help, thank you

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.