r0oth3x49 / udemy-dl

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

It is taking data more than expected #561

Closed pvcodes-zz closed 4 years ago

pvcodes-zz commented 4 years ago

I downloaded a chapter from my udemy course and due to some issue is doesn't download the last video (At this time the size us around 1.5Gb). So on next day I put on download. Firstly, It was checking the whole chapter but I have given the command for a particular lecture. Then, I does something started downloading/checking the all lectures of the chapter after that the the size of that paritcular chapter was around 3.2GBs.

[pvcodes@machine udemy-dl]$ python udemy-dl.py https://www.udemy.com/course/datastructurescncpp/ -c 5 -l 13123988 -q 720 -o ~/Downloads/

Udemy course url: https://www.udemy.com/course/datastructurescncpp/ Run the following command to reproduce the error. python udemy-dl.py https://www.udemy.com/course/datastructurescncpp/ -c 5 -l 13123988 -q 720 -o ~/Downloads/ See error: I explained it earlier

r0oth3x49 commented 4 years ago

The reason it is taking more data is because of requesting extra resources to get hls based streams as well which is the default feature now and you can disable it with --skip-hls switch.

udemy-dl by default request each resource for a course you are trying to download and then once it gets all the resources then you can decide what you want to download which is your case.

You wanted to download chapter 5 it will download the chapter 5 for you but before that it is expected behavior to get all the resources for that course and then download requested resources only.

Plus -l parameter takes lecture number not lecture id, but i guess this can a be feature to download using lecture id as well (thanks for that).

let say you want to download lecture number 3 from chapter 5 (chapter 5 should have lectures >= 3). so in that case the command will be.

python udemy-dl.py https://www.udemy.com/course/datastructurescncpp/ -c 5 -l 3 -o ~/Downloads/

you don't need to specify quality 720 if the lecture has that quality in simple mp4 video then it should download it by default. -q switch is more useful when you want to download hls based streams which even has 1080 videos as well.

hope it clears everything.

pvcodes-zz commented 4 years ago

Yeah mate, that's clear Thanks 😊

On Wed, 23 Sep 2020, 18:23 Nasir Khan, notifications@github.com wrote:

Closed #561 https://github.com/r0oth3x49/udemy-dl/issues/561.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/r0oth3x49/udemy-dl/issues/561#event-3797954213, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM4SDPT242Q3TDB7A2IHO5TSHHVTBANCNFSM4RUAWNRQ .