How to download Coursera videos

Source: Internet
Author: User

In China, Coursera is very choppy and often gets stuck when playing half of the video. I don't know why. Therefore, you can only download the file and view it again.

There is a script on GitHub to open the link to download the entire course. It is very convenient to use. The method is as follows.

Because this script uses multiple Python libraries, it is best to use the Linux system. I use Debian Wheezy and python2.7.3. Of course, you need a Coursera account.

Package and download the link project into a directory with a requirements.txt containing the required libraries and versions. If the library version is incorrect, it may not be able to run.

After entering the root command line, first install the PIP component:

apt-get install python-pip

Use Pip to install the required libraries:

pip install -r requirements.txt

This process is slow, but you can use the script to download it later.

Open the link to the course you want to download, such as the https://class.coursera.org/scicomp-001/class/index where the field between the URL and class is needed.

To download this course, run the following command:

Python coursera_dl.py-u username-P passcode scicomp-001

If you only need to download a part of the command, you can modify the command according to the instructions provided by the author:

General:                     coursera-dl -u <user> -p <pass> saasMultiple classes:            coursera-dl -u <user> -p <pass> saas nlp proglang-2012-001Filter by section name:      coursera-dl -u <user> -p <pass> -sf "Chapter_Four" saasFilter by lecture name:      coursera-dl -u <user> -p <pass> -lf "3.1_" saasDownload only ppt files:     coursera-dl -u <user> -p <pass> -f "ppt" saasUse a ~/.netrc file:         coursera-dl -n saasGet the preview classes:     coursera-dl -n -b saasSpecify download path:       coursera-dl -n --path=C:\Coursera\Classes\ saasMaintain a list of classes in a dir:  Initialize:              mkdir -p CURRENT/{class1,class2,..classN}  Update:                  coursera-dl -n --path CURRENT `ls CURRENT`

The lab's Mbit/s bandwidth download speed is only 15 kbps. You can imagine how slow it will be to watch it online.

If an error occurs during the download process (mostly due to network connection failure), you can use the For Loop in Bash to download only the remaining parts:

For (I = 5; I <10; ++ I) do Python coursera_dl.py-u username-P password $ I scicomp-001done

The range of I is the number of lecture to be downloaded. Of course, re-download is also possible, and I don't know if there will be a mechanism to determine the content to be downloaded.

After downloading the file, you must modify the file owner to obtain the permission. Run the following command:

chown -R user:user ./folder

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.