All Projects → Puyodead1 → udemy-downloader

Puyodead1 / udemy-downloader

Licence: MIT license
A Udemy downloader that can download lectures, with DRM support.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to udemy-downloader

Udemy Downloader Gui
A desktop application for downloading Udemy Courses
Stars: ✭ 5,504 (+985.6%)
Mutual labels:  downloader, udemy, udemy-downloader-gui
ngDownloader
📹 🎥 Now Download videos from any website including YouTube, Facebook, Udemy etc without ads.
Stars: ✭ 47 (-90.73%)
Mutual labels:  downloader, download, udemy
Fgdownloader
用于断点下载、任务队列、上传进度、下载进度
Stars: ✭ 143 (-71.79%)
Mutual labels:  downloader, download
Java Youtube Downloader
Simple, almost zero-dependency java parser for retrieving youtube video metadata
Stars: ✭ 160 (-68.44%)
Mutual labels:  downloader, download
Excel Parser Processor
Simply does the tedious, repetitive operations for all rows of excel files step by step and reports after the job is done. It can download files from URL(s) in a column of Excel files. If a new filename is provided at column B it will rename the file before saving. It will even create sub folders if column C is full with a valid folder name.
Stars: ✭ 177 (-65.09%)
Mutual labels:  downloader, download
Aria2.sh
Aria2 一键安装管理脚本 增强版
Stars: ✭ 1,276 (+151.68%)
Mutual labels:  downloader, download
Filedownloader
Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process
Stars: ✭ 10,408 (+1952.86%)
Mutual labels:  downloader, download
Youget
YouGet - YouTube Video/Playlist Downloader/Cutter - MP3 Converter
Stars: ✭ 169 (-66.67%)
Mutual labels:  downloader, download
Aria2 Pro Docker
Aria2 Pro | A perfect Aria2 Docker image | 更好用的 Aria2 Docker 容器镜像
Stars: ✭ 802 (+58.19%)
Mutual labels:  downloader, download
Saldl
A lightweight well-featured CLI downloader optimized for speed and early preview.
Stars: ✭ 203 (-59.96%)
Mutual labels:  downloader, download
Downloader
Powerful and flexible Android file downloader
Stars: ✭ 193 (-61.93%)
Mutual labels:  downloader, download
gb-dl
A python based utility to download courses from infosec4tc.teachable.com , academy.ehacking.net and stackskills.com for personal offline use.
Stars: ✭ 33 (-93.49%)
Mutual labels:  downloader, download
Docker Jdownloader
JDownloader 2 Docker Image (Multiarch) - Passed 40M Downloads
Stars: ✭ 85 (-83.23%)
Mutual labels:  downloader, download
Github Files Fetcher
Download a specific folder or file from a GitHub repo through command line
Stars: ✭ 73 (-85.6%)
Mutual labels:  downloader, download
4chan Downloader
Python3 script to continuously download all images/webms of multiple 4chan thread simultaneously - without installation
Stars: ✭ 136 (-73.18%)
Mutual labels:  downloader, download
Flickr Set Get
A simple command line app to download photos from a flickr set
Stars: ✭ 57 (-88.76%)
Mutual labels:  downloader, download
Macos Downloader
Command line tool for downloading macOS installers and beta updates
Stars: ✭ 162 (-68.05%)
Mutual labels:  downloader, download
Annie
👾 Fast and simple video download library and CLI tool written in Go
Stars: ✭ 16,369 (+3128.6%)
Mutual labels:  downloader, download
Fast Android Networking
🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
Stars: ✭ 5,346 (+954.44%)
Mutual labels:  downloader, download
Pget
The fastest file download client
Stars: ✭ 724 (+42.8%)
Mutual labels:  downloader, download

Udemy Downloader with DRM support

forthebadge forthebadge forthebadge forthebadge GitHub forks GitHub Repo stars GitHub

NOTE

Description

Utility script to download Udemy courses, has support for DRM videos but requires the user to aquire the decryption key (for legal reasons).
Windows is the primary development OS, but I've made an effort to support Linux also (Mac untested).

Requirements

The following are a list of required third-party tools, you will need to ensure they are in your systems path and that typing their name in a terminal invokes them.

Note: These are seperate requirements that are not installed with the pip command! You will need to download and install these manually!

  • ffmpeg - This tool is also available in Linux package repositories
  • aria2/aria2c - This tool is also available in Linux package repositories
  • shaka-packager
  • yt-dlp - This tool is also available in Linux package repositories, but can also be installed using pip if desired (pip install yt-dlp)

Usage

quick and dirty how-to

You will need to get a few things before you can use this program:

  • Decryption Key ID
  • Decryption Key
  • Udemy Course URL
  • Udemy Bearer Token (aka acccess token for udemy-dl users)
  • Udemy cookies (only required for subscription plans - see Udemy Subscription Plans)

Setting up

  • rename .env.sample to .env (you only need to do this if you plan to use the .env file to store your bearer token)
  • rename keyfile.example.json to keyfile.json

Aquire Bearer Token

  • Firefox: Udemy-DL Guide
  • Chrome: Udemy-DL Guide
  • If you want to use the .env file to store your Bearer Token, edit the .env and add your token.

Key ID and Key

It is up to you to aquire the key and key ID. Please DO NOT ask me for help acquiring these, decrypting DRM protected content can be considered piracy. The tool required for this has already been discused in a GitHub issue.

  • Enter the key and key id in the keyfile.json
  • keyfile example
  • example key and kid from console

Start Downloading

You can now run the program, see the examples below. The course will download to out_dir.

Udemy Subscription Plans

To download a course included in a subscription plan that you did not purchase individually, you will need to follow a few more steps to get setup.

NOTE: You do NOT need to follow this section if you don't have a Udemy Pro or Udemy Personal subscription plan! This section is not for individually purchased courses.

Getting your cookies

  • Go to the page of the course you want to download
  • press control + shift + i (this may be different depending on your OS, just google how to open developer tools)
  • click the Console tab
  • copy and paste document.cookie and press enter
  • copy the text between the quotes

Setup cookie file

  • Create a file called cookies.txt in the same folder as main.py
  • Paste the cookie into the file
  • save and close the file

You will also need to ensure the link is in the following format: https://www.udemy.com/course/<course name>/learn/.

Note the link is /course not /program-taking. It is also important that the link has /learn, otherwise you will see an error when trying to fetch the course information.

Advanced Usage

usage: main.py [-h] -c COURSE_URL [-b BEARER_TOKEN] [-q QUALITY] [-l LANG] [-cd CONCURRENT_DOWNLOADS] [--disable-ipv6] [--skip-lectures] [--download-assets] [--download-captions]
               [--keep-vtt] [--skip-hls] [--info] [--id-as-course-name] [--save-to-file] [--load-from-file] [--log-level LOG_LEVEL] [-v]

Udemy Downloader

optional arguments:
  -h, --help            show this help message and exit
  -c COURSE_URL, --course-url COURSE_URL
                        The URL of the course to download
  -b BEARER_TOKEN, --bearer BEARER_TOKEN
                        The Bearer token to use
  -q QUALITY, --quality QUALITY
                        Download specific video quality. If the requested quality isn't available, the closest quality will be used. If not specified, the best quality will be downloaded
                        for each lecture
  -l LANG, --lang LANG  The language to download for captions, specify 'all' to download all captions (Default is 'en')
  -cd CONCURRENT_DOWNLOADS, --concurrent-downloads CONCURRENT_DOWNLOADS
                        The number of maximum concurrent downloads for segments (HLS and DASH, must be a number 1-30)
  --disable-ipv6        If specified, ipv6 will be disabled in aria2
  --skip-lectures       If specified, lectures won't be downloaded
  --download-assets     If specified, lecture assets will be downloaded
  --download-captions   If specified, captions will be downloaded
  --keep-vtt            If specified, .vtt files won't be removed
  --skip-hls            If specified, hls streams will be skipped (faster fetching) (hls streams usually contain 1080p quality for non-drm lectures)
  --info                If specified, only course information will be printed, nothing will be downloaded
  --id-as-course-name   If specified, the course id will be used in place of the course name for the output directory. This is a 'hack' to reduce the path length
  --save-to-file        If specified, course content will be saved to a file that can be loaded later with --load-from-file, this can reduce processing time (Note that asset links expire
                        after a certain amount of time)
  --load-from-file      If specified, course content will be loaded from a previously saved file with --save-to-file, this can reduce processing time (Note that asset links expire after a
                        certain amount of time)
  --log-level LOG_LEVEL
                        Logging level: one of DEBUG, INFO, ERROR, WARNING, CRITICAL (Default is INFO)
  -v, --version         show program's version number and exit
  • Passing a Bearer Token and Course ID as an argument
    • python main.py -c <Course URL> -b <Bearer Token>
    • python main.py -c https://www.udemy.com/courses/myawesomecourse -b <Bearer Token>
  • Download a specific quality
    • python main.py -c <Course URL> -q 720
  • Download assets along with lectures
    • python main.py -c <Course URL> --download-assets
  • Download assets and specify a quality
    • python main.py -c <Course URL> -q 360 --download-assets
  • Download captions (Defaults to English)
    • python main.py -c <Course URL> --download-captions
  • Download captions with specific language
    • python main.py -c <Course URL> --download-captions -l en - English subtitles
    • python main.py -c <Course URL> --download-captions -l es - Spanish subtitles
    • python main.py -c <Course URL> --download-captions -l it - Italian subtitles
    • python main.py -c <Course URL> --download-captions -l pl - Polish Subtitles
    • python main.py -c <Course URL> --download-captions -l all - Downloads all subtitles
    • etc
  • Skip downloading lecture videos
    • python main.py -c <Course URL> --skip-lectures --download-captions - Downloads only captions
    • python main.py -c <Course URL> --skip-lectures --download-assets - Downloads only assets
  • Keep .VTT caption files:
    • python main.py -c <Course URL> --download-captions --keep-vtt
  • Skip parsing HLS Streams (HLS streams usually contain 1080p quality for Non-DRM lectures):
    • python main.py -c <Course URL> --skip-hls
  • Print course information only:
    • python main.py -c <Course URL> --info
  • Specify max number of concurrent downloads:
    • python main.py -c <Course URL> --concurrent-downloads 20
    • python main.py -c <Course URL> -cd 20
  • Cache course information:
    • python main.py -c <Course URL> --save-to-file
  • Load course cache:
    • python main.py -c <Course URL> --load-from-file
  • Change logging level:
    • python main.py -c <Course URL> --log-level DEBUG
    • python main.py -c <Course URL> --log-level WARNING
    • python main.py -c <Course URL> --log-level INFO
    • python main.py -c <Course URL> --log-level CRITICAL
  • Use course ID as the course name:
    • python main.py -c <Course URL> --id-as-course-name

If you encounter errors while downloading such as

errorCode=1 Network problem has occurred. cause:Unknown socket error 10051 (0x2743)

or

errorCode=1 Network problem has occurred. cause:A socket operation was attempted to an unreachable network.

Then try disabling ipv6 in aria2 using the --disable-ipv6 option

Support

if you want help using the program, join my Discord server or use GitHub Issues

Credits

License

All code is licensed under the MIT license

and finally, donations!

Woo, you made it this far!

I spend a lot of time coding things, and almost all of them are for nothing in return. When theres a lot of use of a program I make, I try to keep it updated, fix bugs, and even implement new features! But after a while, I do run out of motivation to keep doing it. If you like my work, and can help me out even a little, it would really help me out. If you are interested, you can find all the available options here. Even if you don't, thank you anyways!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].