'Why do I get this error when I try to download this course from Udemy: Unable to download webpage, HTTP Error 403?

I purchased a course from udemy and I am trying to download it with last version of youtube-dl but I get this error: Unable to download webpage: HTTP Error 403. I tried --rm-cache-dir option but I did not work too. So what is the problem?


enter image description here



Solution 1:[1]

403 means you are not allowed to do this operation. I assume this is an anti-piracy measure.

Solution 2:[2]

TESTED AND WORKS ON A MAC OS

  1. Install youtube-dl through brew install youtube-dl. If you used curl, you can remove it through rm -rf /usr/local/bin/youtube-dl.
  2. If you face symlink permissions ERRORS, run sudo chown -R $(whoami) $(brew --prefix)/* then brew doctor and fix each error according to the instructions.
  3. brew cleanup
  4. brew link youtube-dl
  5. cd . (navigate to your favorable location that you wish to put your videos folder)
  6. Login to udemy and get site cookies text file. I used Get Cookies.txt.
  7. mkdir MyVideos. (name it as you wish)
  8. youtube-dl --cookies udemy.com_cookies.txt -o '~/MyVideos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/<course-name>
  9. Done! ?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Gwamaka Charles