Puyodead1 / udemy-downloader

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

[Bug]: FileNotFoundError: [WinError 3] #238

Closed erahaman closed 3 months ago

erahaman commented 3 months ago

What happened?

I'm downloading a course with this command

python main.py -c "https://www.udemy.com/course/python-for-computer-vision-with-opencv-and-deep-learning/learn/" -sc --download-assets --download-quizzes --browser brave

but it skips some lectures and sometimes downloads the lecture in the encrypted version which is inaccessible, my key and key id are correct and I have the requirements installed and the other programs.

I have downloaded other courses without any problem but this is the first time to face this issue

Expected Result

expected result is for everything to be downloaded

Branch

master/main

What operating systems are you seeing the problem on?

Windows

Relevant log output

[09:54:26] [udemy-downloader] [parse_new:1636] INFO:   > Processing lecture 16 of 149
[09:54:26] [udemy-downloader] [process_lecture:1452] INFO:       > Lecture '016 MPC 16 - reformulating the cost function from polynomial to matrix vector form 1' has DRM, attempting to download
[09:54:26] [udemy-downloader] [handle_segments:1215] INFO: > Downloading Lecture Tracks...
[09:54:28] [udemy-downloader] [handle_segments:1240] INFO: > Lecture Tracks Downloaded
[09:54:28] [udemy-downloader] [handle_segments:1251] INFO: KID for video file is: b658af1827be4186b2ebb6f38d1e7653
[09:54:28] [udemy-downloader] [handle_segments:1258] INFO: KID for audio file is: b658af1827be4186b2ebb6f38d1e7653
[09:54:28] [udemy-downloader] [handle_segments:1297] INFO: > Merging video and audio, this might take a minute...
[09:54:28] [udemy-downloader] [handle_segments:1302] INFO: > Merging complete, renaming final file...
[09:54:28] [udemy-downloader] [handle_segments:1308] ERROR: Error: 
Traceback (most recent call last):
  File "C:\Users\eraha\Desktop\udemy-downloader\main.py", line 1303, in handle_segments
    os.rename(temp_output_path, output_path)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\eraha\\Desktop\\udemy-downloader\\out_dir\\applied-systems-control-for-engineers-modelling-pid-mpc\\06 - Model Predictive Control - Mathematical Derivation - autonomous vehicle example\\19553144.mp4' -> 'C:\\Users\\eraha\\Desktop\\udemy-downloader\\out_dir\\applied-systems-control-for-engineers-modelling-pid-mpc\\06 - Model Predictive Control - Mathematical Derivation - autonomous vehicle example\\016 MPC 16 - reformulating the cost function from polynomial to matrix vector form 1.mp4'

Other information

Thanks in advance and good luck

Puyodead1 commented 3 months ago

Most likely the path is too long. Move the script closer to the root of the drive and use --id-as-course-name. Make sure you are using the latest version of the script. Not much else I can say about the encrypted files without more info.

erahaman commented 3 months ago

Thank you it worked it turned out that the path was too long, I have another question is it possible to download the assignments section in Udemy courses or not?

Thank you and have a nice day

Puyodead1 commented 3 months ago

Thank you it worked it turned out that the path was too long, I have another question is it possible to download the assignments section in Udemy courses or not?

Thank you and have a nice day

not yet.