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

How To Download Courses From Udemy (Updated)

This document outlines the steps to download courses from Udemy using the Tampermonkey extension and EME Logger Script. It details the process of obtaining decryption keys, installing necessary software, configuring environment variables, and executing a Python script to download course content. The final steps involve merging decrypted audio and video files using MKVToolNix.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views6 pages

How To Download Courses From Udemy (Updated)

This document outlines the steps to download courses from Udemy using the Tampermonkey extension and EME Logger Script. It details the process of obtaining decryption keys, installing necessary software, configuring environment variables, and executing a Python script to download course content. The final steps involve merging decrypted audio and video files using MKVToolNix.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HOW TO DOWNLOAD COURSES FROM UDEMY

PREREQUISITES

The first step is to add the extensionTampermonkeyin your browser and then installoEME Logger Script
that will provide the page initialization data.
Concluindo essas etapas mínimas mencionadas acima, podemos dar continuidade as etapas, que são muitas. Estamos
just at the beginning of a great journey towards the final goal.

Obtaining decryption keys from Udemy.


1. Log in to your Udemy account. (purchases and subscription content are supported)
2. Go to the course that you want to decrypt.

As you can see, the Tampermonkey extension is added to the browser and the Script (EME Logger Script) is being
executed ("injected") on the page.

3. Start playing the content you want to decrypt (always give preference to the following modules).
of the course, as the first one usually consists of introductory content (videos) and does not have widevine protection
DRM - Digital Rights Management
4. Open the web developer tools (ctrl+shift+c or F12) and click on the console tab.
5. Refresh the page and play the content again, always running in the middle section of the video.
course.
6. In the filter bar, look for MediaKeySession::generateRequest where you will see a field called
Below it will be the PSSH of this particular course.
The end of the header is always followed by 8 (eight) zeros (00000000xx7073736800000000), if you see
yes, you are in the right [Link]
After finding the beginning of the header and copying until the end of the converted hex, it should look like this:

In this case, the total amount was:


000000577073736800000000edef8ba979d64acea3c827dcd51d21ed0000003708011210162f7d326cf24f6dbd1319bc5
72bbc151a0b62757964726d6b65796f732210162f7d326cf24f6dbd1319bc572bbc152a024844
Convert the hex back to base64 using([Link]
Example:
9. Install Python on your computer
Let's use Chocolatey, it is a package manager for the Windows operating system. With it,
we can install some of the necessary software via terminal commands, without needing to enter each site, do
download and install each application manually.
Install Chocolatey
Open the Windows PowerShell with administrator privileges and execute the command below:
Set-ExecutionPolicy Bypass -Scope Process -Force; [[Link]]::SecurityProtocol =
[[Link]]::SecurityProtocol -bor 3072; iex ((New-Object
[Link]).DownloadString('[Link]
And then install the prerequisites that will be necessary using PowerShell itself:
choco install python -y
choco install ffmpeg -y
choco install advanced-renamer -y

We also need to insert and configure some binaries in the Windows environment variables (it's nothing more than
that the executable (.exe) of software, without the need to install it directly on the machine)
All these files should be inserted into their respective folders on the primary disk, with these same
names.

You need to copy and paste the folder path of each of them in the PATH, they all must be above the
path of the python executable
C:\aria2
C:\mp4decrypt
C:\shaka-packager
If you have made it this far, then you should consider yourself an intermediate user. Because indeed you are!
Rename the file [Link] to [Link] and insert your ID: KEY (key) that you generated from
your PSSH no([Link]

Enter the key and the key ID in [Link] (open with any text editor like Notepad or another)
of your choice)

Rename the .[Link] file to .env (you only need to do this if you plan to use the .env file to store
your bearer token

How to obtain the access_token?


1. Log in to the Udemy website
2. With the site open, right-click and select inspect or press F12 on the keyboard.
3. In the elements inspector, navigate to the Application tab.
4. In the left sidebar, expand the cookies option and select the item described as Udemy URL
[Link]
5. In the data grid, locate the item 'access_token', copy the value, and then insert it into the .env file.

Then just run the CMD from the Script folderUdemy downloaderand execute the command below:
python [Link] -c(The URL of the course for download) -b(The bearer token to be used) --download-assets --
download-captions --disable-ipv6 --log-level DEBUG

The content will be downloaded and saved in the folder out_dir, with video files (.mp4) and audio files (.m4a) separated.
encrypted.
This was a choice I made, to rename the audio file with an 'OK' and the video file with the name
"encrypt_video". You have to define an input name and another output name that you want.

Then just delete the two middle files that are encrypted and use the software MKVToolNix to merge them.
two decrypted audio and video files. This for each media pair (class). It's simple, but laborious.
Until someone makes a script automating this process, that's what we have for today. Good luck!

Autor:Aquele que não deve ser nomeado.

You might also like