Discussion

This project isn't illegal since it allows you to download only those courses for which you've paid for. You won't be able to download the courses that you haven't bought.
Also the content downloaded should be used for personal consumption only. It is illegal only if you reproduce, redistribute, transmit, assign, sell, broadcast, rent, share, lend, modify, adapt, edit, create derivative works of, sublicense, or otherwise transfer the content you've downloaded.
This product is, probably, made for third-world countries where internet speeds are not good enough to stream online videos at high quality. So users can download the course content and view it offline but should not redistribute it.
Udemy does allow downloading course videos on their official Android app (should be the same on iOS as well). But downloading content on web is not officially supported, which is where this open-source project comes.

@khaliphj@hawkinjs Yep:
"In legal, more complete terms, Udemy grants you (as a student) a limited, non-exclusive, non-transferable license to access and view the courses and associated content for which you have paid all required fees, solely for your personal, non- commercial, educational purposes through the Services, in accordance with these Terms and any conditions or restrictions associated with a particular courses or feature of our Services. All other uses are expressly prohibited. You may not reproduce, redistribute, transmit, assign, sell, broadcast, rent, share, lend, modify, adapt, edit, create derivative works of, sublicense, or otherwise transfer or use any course unless we give you explicit permission to do so in a written agreement signed by a Udemy authorized representative. This also applies to content you can access via any of our APIs."
IANAL, but looks like it would be a violation of the license conditions in their terms of service.

@khaliphj@hawkinjs@rossdcurrie
It probably isn't illegal if you download content for personal consumption. It is illegal if you reproduce/redistribute it in any form. Please see my comment for more explanation.

@khaliphj@hawkinjs@rajat_sriv 'illegal' is a grey question. What is probably more likely true is that it's against the Udemy Terms of Use, which you agree to when you sign up.
Specfically, "When you enroll in a course, you get a license from us to view it via the Udemy Services and no other use. Don’t try to transfer or resell courses in any way."
So, IANAL but I imagine there'd be two things wrong here:
1) You are trying to transfer the course away from udemy
2) They are only granting you license to view it through the service.
It'd be the equivalent of saying because I have a Netflix account I can rip content from their service, and save it to my PC for later viewing (separate to their watch offline feature)