0% found this document useful (0 votes)
133 views6 pages

Python Code

- udemy-dl is a Python utility that allows users to download courses from Udemy for offline personal use across Windows, Linux, and Mac platforms. - It provides options to download courses at specific resolutions, to specific locations, cache credentials for future use, download subtitles only or skip subtitles, and view video metadata. - The utility can be installed via pip and requires Python and certain Python modules, with additional requirements for Mac users. Courses are downloaded by running commands that specify username, password, and course URL along with optional parameters.

Uploaded by

no one
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
133 views6 pages

Python Code

- udemy-dl is a Python utility that allows users to download courses from Udemy for offline personal use across Windows, Linux, and Mac platforms. - It provides options to download courses at specific resolutions, to specific locations, cache credentials for future use, download subtitles only or skip subtitles, and view video metadata. - The utility can be installed via pip and requires Python and certain Python modules, with additional requirements for Mac users. Courses are downloaded by running commands that specify username, password, and course URL along with optional parameters.

Uploaded by

no one
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 6

# udemy-dl

**A cross-platform python based utility to download courses from udemy for personal offline use.**

[![udemy-dl.gif](https://s26.postimg.org/st8y7ud5l/udemy-
dl.gif)](https://postimg.org/image/y4nusjz85/)

### Requirements

- Python (2 or 3)

- Python `pip`

- Python module `requests`

- Python module `colorama`

- Python module `requests[security]` : **(for Mac Users only)**

### Install modules

pip install -r requirements.txt

### Tested on

- Windows 7/8/8.1

- Kali linux (2017.2)

- Mac OSX 10.9.5 (tested with super user)

### Download udemy-dl

You can download the latest version of udemy-dl by cloning the GitHub repository.

git clone https://github.com/r0oth3x49/udemy-dl.git

### Updates
- Added feature to download the default quality if requested quality is not there.

- Added feature to cache the credentials to file and use it later for login purpose.

- Added feature to get user input if no credentials provided using command line argument.

- Updated code for downloading captions (subtitles) if available.

### Change-log

- Fixed some issues & improved code quality for Python3.

- Fixed #13 (UnicodeEncodeError) thanks for quick patch by @jdsantiagojr

- Added feature to skip captions/subtitle and download course only.

- Added feature to download captions/subtitle only thanks to @leo459028.

- Added feature to edit the password by pressing backspace on command line.

### Configuration

<pre><code>

"username" : "abc123@mail.com",

"password" : "12233445",

"output" : "E:\",

"resolution" : "720"

Example for windows users to set output directory:

"output" : "E:\"

</code></pre>
### Usage

***Downloading course***

python udemy-dl.py -u email –p password https://www.udemy.com/ ethical-hacking-


certification-course

***Downloading Course with specific resolution***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -r 720

***Downloading course to a specific location***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -o "/path/to/directory/"

***Downloading course with specific resolution to a specific location***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -r 720 -o "/path/to/directory/"

***Saving download links***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -s

***Saving specific resolution download links***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -s -r 720

***Saving download links to specific location***


python udemy-dl.py -u user@domain.com -p p4ssw0rd
https://www.udemy.com/COURSE_NAME -s -o "/path/to/directory/"

***Saving specific resolution download links to specific location***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -s -r 720 -o "/path/to/directory/"

***Downloading course and caching credentials***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME --configs

***Downloading with specific resolution and allow default resolution as well***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -r 1080 -d

***Downloading course but skip captions/subtitles***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME --skip-sub

***Downloading captions/subtitles only***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME --sub-only

python udemy-dl.py -u EMAIL -p PASSWORD https://www.udemy.com/ethical-hacking-


certification-course/ --sub-only

***Listing course's video informtion***

python udemy-dl.py -u user@domain.com -p p4ssw0rd


https://www.udemy.com/COURSE_NAME -l
the above command will list down the size of video and attached files and available resolutions for a
video in a course.

### Advanced Usage

<pre><code>

Author: Nasir khan (<a href="http://r0oth3x49.herokuapp.com/">r0ot h3x49</a>)

Usage: udemy-dl.py [-h] [-u "username"] [-p "password"] COURSE_URL

[-s] [-l] [-r "resolution"] [-o "/path/to/directory/"]

[-d] [-c/--configs] [--sub-only] [--skip-sub]

A cross-platform python based utility to download courses from udemy for

personal offline use.

Options:

General:

-h, --help Shows the help.

-v, --version Shows the version.

Advance:

-u, --username Username in udemy.

-p, --password Password of your account.

-c, --configs Cache your credentials to use it later.

-s, --save-links Do not download but save links to a file.

-l, --list-infos List all lectures with available resolution.

-r, --resolution Download video resolution, default resolution is 720p.

-d, --get-default Download default resolution if requested not there.

-o, --output Output directory where the videos will be saved,

default is current directory.

Others:
--sub-only Download captions/subtitle only.

--skip-sub Download course but skip captions/subtitle.

Example:

python udemy-dl.py https://www.udemy.com/course_name/

</code></pre>

### Note

<pre><code>Do not change the position of any argument as given under the Usage, this may cause an
error or failur in downloading of course.</code></pre>

# udemy-captions-downloader

An utility to download course's captions from Udemy for personal offline use.

If you want to download all videos and materials from a course, check
https://github.com/nishad/udemy-dl.

Usage:

python udemy-captions.py EMAIL PASSWORD https://www.udemy.com/COURSE_NAME

It will create a folder named "captions" in the current directory.

You might also like