# List available formats
youtube-dl -u <username> -p <password> -F -o './videos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/course-name/
# Download the specified format
youtube-dl -u <username> -p <password> -f <desired-format> -o './videos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/course-name/
# Download specific items
youtube-dl <url> --cookies <cookies-filename> --playlist-items "<comma-separated-indices>"
# Skip specific indices
youtube-dl <url> --cookies <cookies-filename> --playlist-start START_NUMBER
# Download Udemy course videos using youtube-dl
> $ youtube-dl --list-extractors | grep udemy
## Steps
1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
> \# $ youtube-dl {course_link} --cookies {path_to_cookies_file}
> $ youtube-dl https://www.udemy.com/course-name/ --cookies ./udemy-cookies.txt
[1]: https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg