ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.63k stars 10.05k forks source link

HTTP Error 403: FORBIDDEN (caused by HTTPError()) downloading certain UDEMY video #12738

Closed dbodily2000 closed 7 years ago

dbodily2000 commented 7 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.04.14. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?



PS E:\UDEMY Courses\ITIL Foundation COMPLETE ITIL Foundation Exam Training> .\youtube-dl.exe -v -u email@yahoo.com -p ********* https://www.udemy.com/draft/470634/learn/v4/overvie
w
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.udemy.com/draft/470634/learn/v4/overview']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.04.14
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: none
[debug] Proxy map: {}
[udemy:course] Downloading login popup
[udemy:course] Logging in as email@yahoo.com
[udemy:course] draft: Downloading webpage
[udemy:course] 470634: Downloading course curriculum
[download] Downloading playlist: 470634
[udemy:course] playlist 470634: Collected 121 video ids (downloading 121 of them)
[download] Downloading video 1 of 121
[udemy] Downloading login popup
[udemy] 2771478: Downloading webpage
[udemy] 2771478: Downloading lecture JSON
[udemy] 2771478: Downloading lecture JSON
ERROR: Unable to download JSON metadata: HTTP Error 403: FORBIDDEN (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest versio
n; 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\rg3\tmpykl6x8ju\build\youtube_dl\extractor\common.py", line 498, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpykl6x8ju\build\youtube_dl\YoutubeDL.py", line 2100, 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

PS E:\UDEMY Courses\ITIL Foundation COMPLETE ITIL Foundation Exam Training>
...
<end of log>


Trying to download my paid Udemy content, all videos have downloaded correctly except the following URL:https://www.udemy.com/draft/470634/learn/v4/overview I have tried comming back on a different day to see if the course was locked or updated etc. No success. Attached dump if needed, again all other videos ~50 downloaded with no incident using same creds, powershell as admin and same parent directory. Udemy_HTTP_Error_403_dump.txt

dstftw commented 7 years ago

For any further investigations you have to provide account credentials.

Deviad commented 7 years ago

Same here, but having:

"ERROR: Unable to download JSON metadata: HTTP Error 406: NOT ACCEPTABLE (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output."

This happens with: https://www.udemy.com/oop-php-object-oriented-programing-with-project-1-course/learn/v4/content and https://www.udemy.com/become-a-full-stack-developer-with-spring-aws-and-stripe/learn/v4/

It happens also with udemy-dl. https://github.com/nishad/udemy-dl/issues/207

dbodily2000 commented 7 years ago

So after looking further into my own issue, I found that the Udemy error was caused because there was a "draft" (the course was being updated) I have found that by deleting the "draft" portion of the URL, the download worked. I.e:

https://www.udemy.com/draft/470634/learn/v4/overview (does not work)

https://www.udemy.com/470634/learn/v4/overview (does allow download without errors of all content) this may be useful for other users who are having issues downloading wile the course is in a "draft" state.

My issue has been resolved at this time.