Script for downloading Coursera.org videos and naming them.
Project description
coursera-helper
coursera-helper
is forked from coursera-dl which is no longer maintained.
- Introduction
- Installation instructions
- Before the start
- Quick Start
- Troubleshooting
- Reporting issues
- Disclaimer
Introduction
coursera-helper
is a tool for downloading Coursera.org videos and naming them..
It is platform independent, and should work fine under Unix (Linux, BSDs etc.), Windows or Mac OS X.
Installation instructions
coursera-helper
requires Python 3 and very few other dependencies. (As of October 2023, coursera-helper
passed the test of Python versions 3.8, 3.9, 3.10, and 3.11).
Installation (recommended)
Opening a terminal and typing the command If you have installed Python:
python -m pip install coursera-helper
Manual Installation
To install all the dependencies please do:
pip install -r requirements.txt
Docker container
You can run this application via Docker if you want. Just install docker and run
docker run --rm -it -v \
"$(pwd):/courses" \
coursera-helper/coursera_helper -u <USER> -p <PASSWORD>
Before the start
coursera-helper
supports four authentication methods:
-
CAUTH (recommended)
Just use the
--cauth 'CAUTH-value-from-browser'
option when running the program. -
Browser cookies
Just use the
--browser-cookie
option when running the program.Automatically extract CAUTH value from the browser cookie. If this method fails, please use other authentication methods.
-
Username and Password
Just use the
-u <user> -p <pass>
options when running the program.Please note that this method will open the browser, you may have to click on the reCAPTCHA.
-
netrc File
Just use the
--netrc
options when running the program.
Quick Start
Run the following command to query the usage and options:
coursera-helper --help
Run the following command to query the courses in which you are enrolled:
coursera-helper -u <email or username> --list-courses
From there, choose the course you are interested in, copy its course name and use it in the following command:
coursera-helper -u <email or username> <COURSE NAME>
Your downloaded videos will be placed in current directory, but you can also choose another destination with the --path
argument.
To see all available options and a brief description of what they do, simply execute:
coursera-helper --help
Examples
General download:
coursera-helper -u <user> data-analysis-with-python
Download with subtitles:
coursera-helper -u <user> --subtitle-language en,zh-CN|zh-TW data-analysis-with-python
Specify video resolution:
coursera-helper -u <user> --video-resolution 720p data-analysis-with-python
Download with quizzes:
coursera-helper -u <user> --download-quizzes data-analysis-with-python
Download with notebooks:
coursera-helper -u <user> --download-notebooks data-analysis-with-python
Alternatively, if you want to store your preferred parameters (which might also include your username and password), create a file named coursera-dl.conf
where the script is supposed to be executed, with the following format:
--username <user>
--password <pass>
--subtitle-language en,zh-CN|zh-TW
--download-quizzes
--download-notebooks
--video-resolution 720p
--download-delay 10
-cauth <cauth value>
If you have created a file named coursera-dl.conf
, you just download course with command:
coursera-helper data-analysis-with-python
Troubleshooting
CAUTH
Find your coursera CAUTH:
- Open and login to https://www.coursera.org/
- Right-click on the touchpad or mouse until you find inspect.
- Go to Applications > Cookies (and click dropdown) > click https://www.coursera.org/ > find and click CAUTH > Copy value CAUTH.
Chrome:
-
Open the browser and login to https://www.coursera.org/
-
Open the last DevTools panel
Windows or Linux: Press F12 on the keyboard. Or press the Ctrl + Shift + I keys.
Mac: Press Fn + F12 on the keyboard. Or press the Cmd + Option + I keys.
-
Open Application > Storage > Cookies and select https://www.coursera.org/.
-
find and click CAUTH > Copy value CAUTH
**Firefox **:
-
Open the browser and login to https://www.coursera.org/
-
Open the last DevTools panel
Windows or Linux: Press F12 on the keyboard. Or press the Ctrl + Shift + I keys.
Mac: Press Fn + F12 on the keyboard. Or press the Cmd + Option + I keys.
-
Open Storage > Cookies and select https://www.coursera.org/.
-
find and click CAUTH > Copy value CAUTH
china-issues
If you are from China and you're having problems downloading videos, adding
52.84.167.78 d3c33hcgiwev3.cloudfront.net
in the hosts file (/etc/hosts
or C:\Windows\System32\drivers\etc
)
Refresh DNS with this command in the terminal.
ipconfig /flushdns
Reporting issues
Before reporting any issue please follow the steps below:
-
Verify that you are running the latest version of all the programs. Use the following command if in doubt:
pip install --upgrade coursera-helper
-
If the problem persists, feel free to open an issue in our bug tracker, please fill the issue template with as much information as possible.
Disclaimer
coursera-helper
is meant to be used only for your material that coursera gives you access to download. We do not encourage any use that violates their Terms Of Use.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file coursera_helper-0.12.1.tar.gz
.
File metadata
- Download URL: coursera_helper-0.12.1.tar.gz
- Upload date:
- Size: 215.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a46c8902289ba1dcd0595f7813fce2761ed643e8a4d7c8a7c3f69a8ea2a8f5 |
|
MD5 | 25ae8f8f66075e4bcb54a6c7a8acbe1b |
|
BLAKE2b-256 | 6322ac641e2d2a62063041d917058c4b92735f5169193ab1aae9b7ee63f9def7 |
File details
Details for the file coursera_helper-0.12.1-py2.py3-none-any.whl
.
File metadata
- Download URL: coursera_helper-0.12.1-py2.py3-none-any.whl
- Upload date:
- Size: 62.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e169a9a44c907dbbe3a423dc7c91882c60d0b8fb54af94226776c76ced191dd |
|
MD5 | 48f8f4004708534385147c92d60d0267 |
|
BLAKE2b-256 | 4791411329d6fdef52db2b80afcaf0777dc3c10f5a85953349d475b5fd3acc5b |