📜 ⬆️ ⬇️

How to download course materials from coursera.org - quick start guide

Hello!
I signed up for several courses from coursera, but due to lack of time I could not take homework on time. However, the desire to listen to lectures and see additional materials left. But, I wanted to do it all offline. It is not interesting to go into each course and pump out everything from there manually. A very common solution to the problem under the cut. For those who are not familiar with Python.

After a bit of searching, I came across a script that helps to download all the available materials from the course that interests me. I read the readme and understand that I need some kind of python and something else incomprehensible. Yes, I am not a programmer, I do not know how to write on python and in general I don’t have it.
Well, let's get started.

First you need to install Python.
Go to the site python.org/download and there we select the desired installation. For example, Python 2.7.3 Windows Installer (our script only works for 2.7). Install in the default folder without changing any settings. After we read that we need some kind of pip, with which you can install a script for downloading materials.
If you follow the link from the githab, it is very easy for a Windows user to get confused. Therefore, we act easier. We are looking for how to put this very pip on Windows. The solution is here . We follow the link from the answers and scroll down the page. Since we installed Python 2.7.3, then select the appropriate installer: setuptools-0.6c11.win32-py2.7.exe
Download, run, agree with everything and do not touch anything in the ways.
Now it is necessary to add a line of the form to the end of the environmental variable PATH:

C:\Python27;C:\Python27\Scripts;


')
Next, run the cmd console. But further, no pip set. And we write simply:

easy_install coursera-dl

As far as I understand that pip, that easy_install are package managers (or is it cleverly called?), Respectively, you should be able to do almost the same thing. Well, do not bother.



Everything, the script was set, it would be time to launch it.

We write

coursera-dl –u %username% -p %password% -d D:\ introastro-2012-001

This is for example. Where between percentages is our username and password on the cursor. After –d is the path where to load the data. And then the name of the course. The name of the course is taken from its address: class.coursera.org/introastro-2012-001/class/index



We see that a certain lxml is inaccessible and therefore a standard parser is used. There are two options - to score or put lxml.
Personally, when I try to install lxml, I get an error:



Searches show that we seem to be downloading source codes that would be good to compile, but there is nothing. Here either we put some kind of compiler, or we don’t bother and look for the compiled library. For example, here . Download lxml-3.0.1.win32-py2.7.exe and install. In the installation process, again, we do not change anything. After installation, run the script again. Everything is working. Only the script itself for some reason does not want to download additional videos from YouTube, but this is already a question for the script developer.

Everything is done on Windows 7 32-bit.
Although, all these dances with a tambourine - really no one will make a normal graphical interface?

Source: https://habr.com/ru/post/161475/


All Articles