r0oth3x49 / udemy-dl

A cross-platform python based utility to download courses from udemy for personal offline use.
MIT License
4.86k stars 1.2k forks source link

Downloading asset files(.py) #501

Closed Redlava60 closed 4 years ago

Redlava60 commented 4 years ago

Course: https://www.udemy.com/course/python-training/

Description: It downloaded the course well, but since the course has some .py files attached, it wasn't able to download them and was showing the error, as shown below https://i.imgur.com/q8pdfMF.png

Error output:

[] : Downloading asset(s) [] : Downloading (file:py@py) [*] : Asset : 'file:py@py' (download skipped). [-] : Udemy returned HTTP Code 416: Requested Range Not Satisfiable

[] : Downloading asset(s) [] : Downloading (file:py@py) [*] : Asset : 'file:py@py' (download skipped). [-] : Udemy returned HTTP Code 416: Requested Range Not Satisfiable

[] : Downloading asset(s) [] : Downloading (file:py@py) [*] : Asset : 'file:py@py' (download skipped). [-] : Udemy returned HTTP Code 416: Requested Range Not Satisfiable

[] : Downloading asset(s) [] : Downloading (file:py@py) [*] : Asset : 'file:py@py' (download skipped). [-] : Udemy returned HTTP Code 416: Requested Range Not Satisfiable

[] : Downloading asset(s) [] : Downloading (file:py@py) [*] : Asset : 'file:py@py' (download skipped). [-] : Udemy returned HTTP Code 416: Requested Range Not Satisfiable

Nightreaver commented 4 years ago

I have the 'complete-python-developer-zero-to-mastery' and it downloaded .py files well. So it might be another issue?

r0oth3x49 commented 4 years ago

I have the 'complete-python-developer-zero-to-mastery' and it downloaded .py files well. So it might be another issue?

Awesome it means i 'm not the only one who can't reproduce for me it downloads any sort of file if the link is not expired. so i 'm closing the issue as invalid because no response from @Redlava60 .

Nightreaver commented 4 years ago

So, coming back to this, its not totally invalid. It does not specifically happen on .py file, but any resource I just found myself that this happens to me as well. too a specific course and all containing files in a chapter

be it .json, .ps1 or .txt

technically, the files are getting downloaded and saved as .part, but they wont be renamed. when you run the downloader again, you are requesting the missing range/byte offset from the server, which is obviously "not in range" so you will get an 416 because the file is already downloaded completely.

@r0oth3x49 try deleteing some of your asset files and try re-downloading them, they might come up as .part first, then failing in second run

r0oth3x49 commented 4 years ago

So, coming back to this, its not totally invalid. It does not specifically happen on .py file, but any resource I just found myself that this happens to me as well. too a specific course and all containing files in a chapter

be it .json, .ps1 or .txt

technically, the files are getting downloaded and saved as .part, but they wont be renamed. when you run the downloader again, you are requesting the missing range/byte offset from the server, which is obviously "not in range" so you will get an 416 because the file is already downloaded completely.

@r0oth3x49 try deleteing some of your asset files and try re-downloading them, they might come up as .part first, then failing in second run

awesome i will check and fix

Nightreaver commented 4 years ago

The exact issue is, that the amount of data that is downloaded is technically more than the size of the file itself image