[Udemy] ERROR: Unable to download webpage: HTTP Error 403: Forbidden
See original GitHub issueChecklist
- I’m reporting a broken site support
- I’ve verified that I’m running youtube-dl version 2021.06.06
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones
Verbose log
C:\>youtube-dl.exe -u **** -p **** https://www.udemy.com/course/learn-advanced-java/ --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.udemy.com/course/learn-advanced-java/', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: none
[debug] Proxy map: {}
[udemy:course] Downloading login popup
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 634, in _request_webpage
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 2288, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default```
Description
I was trying to download the learn advanced Java course which I have bought from Udemy for offline watching purposes. However, youtube-dl gives me an error when trying to do so.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:33 (14 by maintainers)
Top Results From Across the Web
Udemy.com HTTP Error 403: Forbidden (caused by ... - GitHub
The download will not work, because the course is not downloadable from the browser. You can check the api calls and search for...
Read more >HTTP Error 403: Forbidden in youtube-dl - Stack Overflow
It's a known issue. There's no fix for it at this time. Udemy changed how their cookies and session-id's are handled.
Read more >Unable to download webpage: HTTP Error 403 - Reddit
Unable to download webpage : HTTP Error 403: Forbidden (caused by HTTPError()). Hello everyone, I'm trying to download an Udemy course but I ......
Read more >HTTP Error 403 Forbidden Messages: What They Are & How ...
An easy way to remember it: 403 says "access denied" while 404 says "We can't find what you asked for." What causes a...
Read more >HTTP 403 Forbidden | What is 403 Forbidden Error and How ...
Clear Your Browser's Cookies : This is especially necessary if you log into the website but your last attempt was unsuccessful. However, ensure ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was having the
403
issue, and then I was having an extract login-form form issue, but I was able to resolve both of them and get youtube-dl working with Udemy.First I was able to resolve the 403 by logging into the website in chrome and then downloading the cookie file and including it with the ‘–cookie /path/to/cookie.txt’ option. (See How do I pass cookies to youtube-dl). But then I was still getting the error:
It turns out this was caused because in my youtube-dl request I was passing
-u username -p password
options to the request which was causing the login popup preventing the download.Also to note, in the URL for a course in Udemy, i.e.
https://www.udemy.com/course/understanding-typescript/
, there is an extra/course/
that needs to be removed for the request. So the URL should instead look likehttps://www.udemy.com/understanding-typescript/
.Put all this together and a valid request should look like:
Where you replace the path to the cookie file, the path to the output directory, and the course name in the Udemy URL.
Hope this helps 😃
note