Puyodead1 / udemy-downloader

A Udemy downloader that can download courses, with DRM support.
MIT License
1.31k stars 307 forks source link

[Bug]: Failed request #132

Closed samsam619 closed 1 year ago

samsam619 commented 2 years ago

What happened?

First of all Thank you very much for your hard work to making this project. i will appriciate you by donating in crypto usdt for this efforts. however i try to run your script i am getting this error while downloading course. Evan i logout and relogin account many time and update .env file with new barear token but still i am getting this issue. kindly see the screenshot. Is my command is perfect and where i am doing mistake. i am not using any udemy subs plan. I am using normal account and i bought some courses.

Screenshot 2022-08-07 154703 e

Expected Result

Download all lectures successfully.

Branch

master/main

What operating systems are you seeing the problem on?

Windows

Relevant log output

No response

Other information

i am using master branch

Puyodead1 commented 2 years ago

Is the course part of a subscription plan?

samsam619 commented 2 years ago

@Puyodead1 no this is normal free account. and i have enrolled course which i tried to download i search this issue on google and i got some answers that need to add user-agent login request but i don't know how to do that i just tell me what i got ans

samsam619 commented 2 years ago

@Puyodead1 dear did you work on it to solve this issue ?

Puyodead1 commented 2 years ago

@Puyodead1 dear did you work on it to solve this issue ?

I haven't gotten around to looking into it yet.

samsam619 commented 2 years ago

@Puyodead1 i think it is ip issue can you give me a favor ? can you send me proxy server with login auth python code i will add this code in your file and will add proxy details i hope then it will work.

samsam619 commented 2 years ago

@Puyodead1 Dear can you please come to my computer via teamviewer ? i can share you my info in email

rickeymandraque commented 2 years ago

Hello, Try this : Open Windows PowerShell or PowerShell in admin and type :

cd THE_PATH_OF_UDEMY_DOWNLOADER
pip uninstall -r requirements.txt
pip install -r requirements.txt
exit

open console in user (not admin)

cd THE_PATH_OF_UDEMY_DOWNLOADER
python main.py -c YOUR_URL -b YOUR_TOKEN_ACCESS

It was worked for me.

If it's a paid course, it must be DRM protected. some clues: Either your keys are not the right ones. Either you reversed the key and the KID (yes, I made that mistake ! ) If it's not your case : Either your token is not good (or your .env file ... Yes, I also made this mistake! That's why I use the "-b" option, I see my token directly) Either you are not registered on the course (you would know it anyway!)

samsam619 commented 2 years ago

@rickeymandraque i do this again and its still not working about the key. it is working in my home computer but not in office computer i dont have good internet speed in home thats why i am trying it in office internet are you python developer ? can you come in my computer via teamviewer ?

rickeymandraque commented 2 years ago

Read all before. :)

@rickeymandraque I start again and it still doesn't work about key. it works on my personal computer but not on my desktop computer

So, that's not the problem. Check all the same that the keys of your personal PC and your desktop PC are the same using the procedure that you must know... but... i have a doubt... Because I have the impression that you have multiple errors:

Uh?! Do you have admin rights / admin privilege on your desktop computer at work ? Maybe python is not properly installed, or a proxy block requests to udemy (I don't think so...) or whatever...

are you a python developer?

I don't do python development, I'm I.T. and I'm just sharing my experience to help people. :)

can you come to my computer via teamviewer?

I don't speak English, so communication will be difficult and issues on github also serves as a knowledge base, you have to go through here.

This is a check list to do on your desktop computer:

Download (again !) the latests version of Udemy-Downloader, FFmpeg, aria2/aria2c and shaka-pakager (rename packager-win.exe to shaka-pakager.exe). The directory should look like this :

# Letter and directory name is not important.
C:\Udemy-Downloader-Master > dir
d----          16/08/2022    08:18                __pycache__
d----          16/08/2022    08:14                .github
d----          16/08/2022    08:16                presets
-a---          16/08/2022    08:14             23 _version.py
-a---          16/08/2022    08:14             54 .env
-a---          16/08/2022    08:14             35 .env.sample
-a---          16/08/2022    08:14             66 .gitattributes
-a---          16/08/2022    08:14           1470 .gitignore
-a---          16/08/2022    08:14        5596672 aria2c.exe
-a---          16/08/2022    08:14           2426 constants.py
-a---          16/08/2022    08:14      123122176 ffmpeg.exe
-a---          16/08/2022    08:14      122984448 ffplay.exe
-a---          16/08/2022    08:14      123026432 ffprobe.exe
-a---          16/08/2022    08:14             21 keyfile.example.json
-a---          16/08/2022    08:14             76 keyfile.json
-a---          16/08/2022    08:14           1066 LICENSE
-a---          16/08/2022    08:56          72653 main.py
-a---          16/08/2022    08:14         365568 mp4decrypt.exe
-a---          16/08/2022    08:14         327680 mp4dump.exe
-a---          16/08/2022    08:14          17524 mp4parse.py
-a---          16/08/2022    08:14          11718 README.md
-a---          16/08/2022    08:14            173 requirements.txt
-a---          16/08/2022    08:14        3547136 shaka-packager.exe
-a---          16/08/2022    08:14            861 utils.py
-a---          16/08/2022    08:14            659 vtt_to_srt.py
-a---          16/08/2022    08:14           5422 widevine_pssh_pb2.py

I just noticed that your version of python is 3.8, is that correct?

To find out, type

python --version

Upgrade Python with the full 64-bit installer (make sure to select the "Add Python 3.10 to PATH" option) with admin privilege.

Retry this https://github.com/Puyodead1/udemy-downloader/issues/132#issuecomment-1216271820 (this is easier than updating modules one by one)

Are they the same errors now?

Do you have the possibility to test with another course, even 2? (one free and one paid, in that order)

What happen with free course ?

What happen with paid courses ?

samsam619 commented 2 years ago

@rickeymandraque all these files are present in my download directory and i am using same python version in my home computer and script working fine there but not in office computer. everything is same and evan my access token is working well in home internet. i tried many courses but getting same login issue i think the problem is in proxy ip.